package com.hgkj.cloud.customer.util;

import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hgkj.cloud.customer.common.ClsHKEffective;
import com.hgkj.cloud.base.domain.ExtFieldRecord;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray;

@Slf4j
public class ExcleTableCreateUtil {

    /**
     * 扩张字段 行头
     *
     * @param channelExtFieldRecord
     * @param ws
     * @param num                   第几列
     * @throws WriteException
     */
    private static void basePaintingExtFieldRecord(List<ExtFieldRecord> channelExtFieldRecord, WritableSheet ws, int num) throws WriteException {
        for (int i = 0; i < channelExtFieldRecord.size(); i++) {
            Label labelTemp = new Label(num + i + 1, 0, channelExtFieldRecord.get(i).getField_name_cn());
            ws.addCell(labelTemp);
        }
    }

    /**
     * 扩展字段信息填充
     *
     * @param channelExtFieldRecord 渠道扩展字段
     * @param ws
     * @param num                   第几列
     * @param i                     第几行
     * @param ext_json              当前用户扩展信息
     * @throws WriteException
     */
    private static void baseFillExtFieldRecord(List<ExtFieldRecord> channelExtFieldRecord, WritableSheet ws, int num, int i, Object ext_json) throws WriteException {
        if (ext_json != null) {
            JSONArray resultArry = JSONArray.fromObject(ext_json);
            Map<String, Object> tempMap = new HashMap<>();
            for (Object aResultArry : resultArry) {
                Map<String, Object> map = JSONObject.parseObject(JSON.toJSONString(aResultArry));
                if (map.get("fieldName") != null) {
                    tempMap.put(map.get("fieldName").toString(), map.get("fieldValue"));
                }
            }
            for (int k = 0; k < channelExtFieldRecord.size(); k++) {
                channelExtFieldRecord.get(k).getField_name();
                Label tableTempI = new Label(num + k + 1, i + 1,
                        tempMap.get(channelExtFieldRecord.get(k).getField_name().toString()) == null
                                ? "" : tempMap.get(channelExtFieldRecord.get(k).getField_name().toString()).toString());
                ws.addCell(tableTempI);
            }
        }
    }

    public static void getExcel(List<Map<String, Object>> lists, OutputStream os, List<ExtFieldRecord> channelExtFieldRecord)
            throws IOException, WriteException, RowsExceededException {
        WritableWorkbook wwb = null;
        // 创建可写入的Excel工作簿
        wwb = Workbook.createWorkbook(os);
        WritableSheet ws = wwb.createSheet("测评报告答题数据", 0);
        // 查询数据库中所有的数据
        Map<String, Object> umap = new HashMap<String, Object>();

        List<Map<String, Object>> reports = lists;
        // 要插入到的Excel表格的行号，默认从0开始
        Label table_chinese_name = new Label(0, 0, "量表名称");
        Label ex_user_name = new Label(1, 0, "用户名");
        Label ex_real_name = new Label(2, 0, "真实姓名");
        Label ex_nick_name = new Label(3, 0, "微信昵称");
        Label ex_user_phone = new Label(4, 0, "手机号");
        Label ex_user_gender = new Label(5, 0, "性别");
        Label ex_user_birth = new Label(6, 0, "出生日期");
        Label date = new Label(7, 0, "完成时间");
        Label user_whole_name = new Label(8, 0, "组织机构");
        Label report_prompt = new Label(9, 0, "报告总评");
        Label ex_report_level = new Label(10, 0, "风险等级");
        Label answer = new Label(11, 0, "答题数据");
        Label answer_time = new Label(12, 0, "答题用时");


        ws.addCell(table_chinese_name);
        ws.addCell(ex_user_name);
        ws.addCell(ex_real_name);
        ws.addCell(ex_nick_name);
        ws.addCell(ex_user_phone);
        ws.addCell(ex_user_gender);
        ws.addCell(ex_user_birth);
        ws.addCell(date);
        ws.addCell(user_whole_name);
        ws.addCell(report_prompt);
        ws.addCell(ex_report_level);
        ws.addCell(answer);
        ws.addCell(answer_time);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, 12);
        // 组织机构
        for (int i = 0; i < reports.size(); i++) {
            Label table_chinese_name_i = null;
            if (reports.get(i).get("chinese_name") != null
                    && !reports.get(i).get("chinese_name").toString().equals("")) {
                table_chinese_name_i = new Label(0, i + 1, reports.get(i).get("chinese_name").toString());
            } else {
                table_chinese_name_i = new Label(0, i + 1, "暂无");
            }
            Label user_name_i = null;
            if (reports.get(i).get("user_name") != null && !reports.get(i).get("user_name").toString().equals("")) {
                user_name_i = new Label(1, i + 1, reports.get(i).get("user_name").toString());
            } else {
                user_name_i = new Label(1, i + 1, "暂无");
            }
            Label real_name_i = null;
            if (reports.get(i).get("real_name") != null && !reports.get(i).get("real_name").toString().equals("")) {
                real_name_i = new Label(2, i + 1, reports.get(i).get("real_name").toString());
            } else {
                real_name_i = new Label(2, i + 1, "暂无");
            }

            Label nick_name_i = null;
            if (reports.get(i).get("nick_name") != null && !reports.get(i).get("nick_name").toString().equals("")) {
                nick_name_i = new Label(3, i + 1,reports.get(i).get("nick_name").toString());
            } else {
                nick_name_i = new Label(3, i + 1, "暂无");
            }
            Label user_phone_i = null;
            if (reports.get(i).get("user_phone") != null && !reports.get(i).get("user_phone").toString().equals("")) {
                user_phone_i = new Label(4, i + 1,reports.get(i).get("user_phone").toString());
            } else {
                user_phone_i = new Label(4, i + 1, "暂无");
            }

            Label user_gender_i = null;
            if (reports.get(i).get("user_gender") != null && !reports.get(i).get("user_gender").toString().equals("")) {
                user_gender_i = new Label(5, i + 1, reports.get(i).get("user_gender").toString().equals("1") ? "男"
                        : reports.get(i).get("user_gender").toString().equals("2") ? "女" : "暂无");
            } else {
                user_gender_i = new Label(5, i + 1, "暂无");
            }

            Label user_birth_i = null;
            if (reports.get(i).get("user_birth") != null && !reports.get(i).get("user_birth").toString().equals("")) {
                Long birth = new Long(reports.get(i).get("user_birth").toString())*1000;
                Date birthdate = new Date(birth);
                user_birth_i = new Label(6, i + 1, new SimpleDateFormat("yyyy-MM-dd").format(birthdate));
            } else {
                user_birth_i = new Label(6, i + 1, "暂无");
            }

            Label date_i = null;
            if (reports.get(i).get("date") != null && !reports.get(i).get("date").toString().equals("")) {
                date_i = new Label(7, i + 1, !reports.get(i).get("date").toString().isEmpty() ? DateTimeUtil
                        .getWholeStringFromUTC(Long.parseLong(reports.get(i).get("date").toString()) / 1000) : "暂无");
            } else {
                date_i = new Label(7, i + 1, "暂无");
            }

            Label whole_name_i = null;
            if (reports.get(i).get("whole_name") != null && !reports.get(i).get("whole_name").toString().equals("")) {
                whole_name_i = new Label(8, i + 1,
                        !reports.get(i).get("whole_name").toString().isEmpty()
                                ? reports.get(i).get("whole_name").toString()
                                : "暂无");
            } else {
                whole_name_i = new Label(8, i + 1, "暂无");
            }

            Label report_prompt_i = null;
            if (reports.get(i).get("report_prompt") != null
                    && !reports.get(i).get("report_prompt").toString().equals("")) {
                report_prompt_i = new Label(9, i + 1,
                        !reports.get(i).get("report_prompt").toString().isEmpty()
                                ? reports.get(i).get("report_prompt").toString()
                                : "暂无");
            } else {
                report_prompt_i = new Label(9, i + 1, "暂无");
            }

            Label report_level_i = null;
            if (reports.get(i).get("report_level") != null
                    && !reports.get(i).get("report_level").toString().equals("")) {
                report_level_i = new Label(10, i + 1,
                        !reports.get(i).get("report_level").toString().isEmpty()
                                ? reports.get(i).get("report_level").toString()
                                : "暂无");
            } else {
                report_level_i = new Label(10, i + 1, "暂无");
            }
            Label answer_i = null;
            if (reports.get(i).get("answer") != null && !reports.get(i).get("answer").toString().equals("")) {
                answer_i = new Label(11, i + 1,
                        !reports.get(i).get("answer").toString().isEmpty() ? reports.get(i).get("answer").toString()
                                : "暂无");
            } else {
                answer_i = new Label(11, i + 1, "暂无");
            }
            Label answer_time_i = null;
            if (reports.get(i).get("answer_time") != null && !reports.get(i).get("answer_time").toString().equals("")) {
                answer_time_i = new Label(12, i + 1,
                        !reports.get(i).get("answer_time").toString().isEmpty() ? DateTimeUtil.getStringFromSeconds(
                                Integer.parseInt(reports.get(i).get("answer_time").toString())) : "暂无");
            } else {
                answer_time_i = new Label(12, i + 1, "暂无");
            }

            ws.addCell(table_chinese_name_i);
            ws.addCell(user_name_i);
            ws.addCell(real_name_i);
            ws.addCell(nick_name_i);
            ws.addCell(user_phone_i);
            ws.addCell(user_gender_i);
            ws.addCell(user_birth_i);
            ws.addCell(date_i);
            ws.addCell(whole_name_i);
            ws.addCell(report_prompt_i);
            ws.addCell(report_level_i);
            ws.addCell(answer_i);
            ws.addCell(answer_time_i);
            Object ext_json = reports.get(i).get("ext_json");
            baseFillExtFieldRecord(channelExtFieldRecord, ws, 12, i, ext_json);

        }
        // 写进文档
        wwb.write();
        // 关闭Excel工作簿对象
        wwb.close();
    }

    /**
     * 谎 分 lie_o lie_s lie_a 诈 分 infra_o infra_s infra_a 校正分 defen_o defen_s defen_a
     * 疑 病 hypoch_o hypoch_s hypoch_a 抑 郁 depre_o depre_s depre_a 癔 症 hyste_o
     * hyste_s hyste_a 心理变态 psychop_o psychop_s psychop_a 男性化-女性化 mascu_o mascu_s
     * mascu_a 偏 执 para_o para_s para_a 精神衰弱 psychas_o psychas_s psychas_a 精神分裂
     * schi_o schi_s schi_a 轻躁症 hypoma_o hypoma_s hypoma_a 社会内向 social_o social_s
     * social_a 不一致性 differ_o differ_a
     */
    public static void getExcleTableDetails(List<Map<String, Object>> lists, OutputStream os, String formName, List<ExtFieldRecord> channelExtFieldRecord)
            throws Exception {
        WritableWorkbook wwb = null;
        // 创建可写入的Excel工作簿
        wwb = Workbook.createWorkbook(os);
        WritableSheet ws = wwb.createSheet("测评报告答题数据", 0);
        // 查询数据库中所有的数据
        Map<String, Object> umap = new HashMap<String, Object>();

        List<Map<String, Object>> reports = lists;
        // 要插入到的Excel表格的行号，默认从0开始
        // 画表格
        switch (formName) {
            case "566":// 明尼苏达多相人格测验 566
            case "399":// 明尼苏达多相人格测验 399
                paintingForm(ws, formName, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    fillData(ws, reports, i, formName, channelExtFieldRecord);
                }
                break;
            case "PSQI":// 匹茨堡睡眠质量指数 (PSQI)
                basePainting(ws);
                paintingForPSQI(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForPSQI(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "LSAS":// 社交焦虑量表 (LSAS)
                basePainting(ws);
                paintingForLSAS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForLSAS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "YBOCS":// Yale—Brown强迫评定量表 (Y-BOCS)
                basePainting(ws);
                paintingForYBOCS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForYBOCS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "EPQC":// 艾森克个性测验(儿童) (EPQ)
                basePainting(ws);
                paintingForEPQC(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForEPQC(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "EPQD":// 艾森克个性测验(成人) (EPQ
                basePainting(ws);
                paintingForEPQD(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForEPQD(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "16PF":// 卡特尔16种个性测验 (16PF)
                basePainting(ws);
                paintingFor16PF(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataFor16PF(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "BRMS":// 躁狂量表 (BRMS)
                basePainting(ws);
                paintingForBRMS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForBRMS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "SAS":// 焦虑自评量表（SAS）
                basePainting(ws);
                paintingForSAS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForSAS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "SDS":// 抑郁自评量表（SDS）
                basePainting(ws);
                paintingForSDS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForSDS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "SF36":// 健康状况问卷 (SF-36)
                basePainting(ws);
                paintingForSF36(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForSF36(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "BPRS":// 简明精神病量表 (BPRS)
                basePainting(ws);
                paintingForBPRS(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForBPRS(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "CMMSE":// 简易智力状态检查 (CMMSE)
                basePainting(ws);
                paintingForCMMSE(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForCMMSE(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "HAMA":// 汉密顿焦虑量表（HAMA）
                basePainting(ws);
                paintingForHAMA(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForHAMA(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "HAMD":// 汉密顿抑郁量表 (HAMD)
                basePainting(ws);
                paintingForHAMD(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForHAMD(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "SCL90":// 90项症状清单 (SCL90)
                basePainting(ws);
                paintingForSCL90(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForSCL90(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Shirritant":// 公安民警应激生活事件调查表(Shirritant)
                basePainting(ws);
                paintingForShirritant(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForShirritant(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Les":// 公安民警应激生活事件调查表(Shirritant)
                basePainting(ws);
                paintingForLES(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForLES(12,ws, reports, i, channelExtFieldRecord);
                }
                break;

            case "Aslec":// 青少年生活事件量表(Aslec)
                basePainting(ws);
                paintingForAslec(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForAslec(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Adhd":// 多动症诊断量表(Adhd)
                basePainting(ws);
                paintingForAdhd(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForAdhd(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Xljk":// 中国中学生心理健康检测(Xljk)
                basePainting(ws);
                paintingForXljk(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForXljk(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Xxdj":// 中学生学习动机调查表(Xxdj)
                basePainting(ws);
                paintingForXxdj(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForXxdj(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Ksxwkl":// 考试行为困扰心理测查(Ksxwkl)
                basePainting(ws);
                paintingForKsxwkl(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForKsxwkl(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Zbxl":// 中学生自信心困扰检测(Zbxl)
            case "Zxsynl":// 中学生在校适应能力诊断(Zxsynl)
                basePainting(ws);
                paintingForTotal(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForTotal(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Xxxljkzh":// 小学生心理健康综合测量(Xxxljkzh)
                basePainting(ws);
                paintingForXxxljkzh(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForXxxljkzh(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
            case "Zxxljkzh":// 中学生心理健康综合测量(Zxxljkzh)
                basePainting(ws);
                paintingForZxxljkzh(12,ws, channelExtFieldRecord);
                for (int i = 0; i < reports.size(); i++) {
                    // 填数据
                    baseFillData(ws, reports, i);
                    fillDataForZxxljkzh(12,ws, reports, i, channelExtFieldRecord);
                }
                break;
        }

        // 写进文档
        wwb.write();
        // 关闭Excel工作簿对象
        wwb.close();
    }

    private static void paintingForm(WritableSheet ws, String formName, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Integer index = 0;
        Label table_chinese_name = new Label(index++, 0, "量表名称");
        Label ex_user_name = new Label(index++, 0, "用户名");
        Label ex_real_name = new Label(index++, 0, "真实姓名");
        Label ex_nick_name = new Label(index++, 0, "微信昵称");
        Label ex_user_phone = new Label(index++, 0, "手机号");
        Label ex_user_gender = new Label(index++, 0, "性别");
        Label ex_user_birth = new Label(index++, 0, "出生日期");
        Label date = new Label(index++, 0, "完成时间");
        Label user_whole_name = new Label(index++, 0, "组织机构");
        Label report_prompt = new Label(index++, 0, "报告总评");
        Label ex_report_level = new Label(index++, 0, "风险等级");

        Label lie_o = new Label(index++, 0, "谎分原始分");
        Label lie_s = new Label(index++, 0, "谎分标准分");
        Label lie_a = new Label(index++, 0, "谎分参考提示");

        Label infra_o = new Label(index++, 0, "诈分原始分");
        Label infra_s = new Label(index++, 0, "诈分标准分");
        Label infra_a = new Label(index++, 0, "诈分参考提示");

        Label defen_o = new Label(index++, 0, "校正分原始分");
        Label defen_s = new Label(index++, 0, "校正分标准分");
        Label defen_a = new Label(index++, 0, "校正分参考提示");

        Label hypoch_o = new Label(index++, 0, "疑病原始分");
        Label hypoch_s = new Label(index++, 0, "疑病标准分");
        Label hypoch_a = new Label(index++, 0, "疑病参考提示");

        Label depre_o = new Label(index++, 0, "抑郁原始分");
        Label depre_s = new Label(index++, 0, "抑郁标准分");
        Label depre_a = new Label(index++, 0, "抑郁参考提示");

        Label hyste_o = new Label(index++, 0, "癔症原始分");
        Label hyste_s = new Label(index++, 0, "癔症标准分");
        Label hyste_a = new Label(index++, 0, "癔症参考提示");

        Label psychop_o = new Label(index++, 0, "心理变态原始分");
        Label psychop_s = new Label(index++, 0, "心理变态标准分");
        Label psychop_a = new Label(index++, 0, "心理变态参考提示");

        Label mascu_o = new Label(index++, 0, "男性化-女性化原始分");
        Label mascu_s = new Label(index++, 0, "男性化-女性化标准分");
        Label mascu_a = new Label(index++, 0, "男性化-女性化参考提示");

        Label para_o = new Label(index++, 0, "偏执原始分");
        Label para_s = new Label(index++, 0, "偏执标准分");
        Label para_a = new Label(index++, 0, "偏执参考提示");

        Label psychas_o = new Label(index++, 0, "精神衰弱原始分");
        Label psychas_s = new Label(index++, 0, "精神衰弱标准分");
        Label psychas_a = new Label(index++, 0, "精神衰弱参考提示");

        Label schi_o = new Label(index++, 0, "精神分裂原始分");
        Label schi_s = new Label(index++, 0, "精神分裂标准分");
        Label schi_a = new Label(index++, 0, "精神分裂参考提示");

        Label hypoma_o = new Label(index++, 0, "轻躁症原始分");
        Label hypoma_s = new Label(index++, 0, "轻躁症标准分");
        Label hypoma_a = new Label(index++, 0, "轻躁症参考提示");

        Label social_o = new Label(index++, 0, "社会内向原始分");
        Label social_s = new Label(index++, 0, "社会内向标准分");
        Label social_a = new Label(index++, 0, "社会内向参考提示");
        if ("566".equals(formName)) {
            Label mani_o = new Label(index++, 0, "外显性焦虑原始分");
            Label mani_s = new Label(index++, 0, "外显性焦虑标准分");
            Label mani_a = new Label(index++, 0, "外显性焦虑参考提示");

            Label depend_o = new Label(index++, 0, "依赖性原始分");
            Label depend_s = new Label(index++, 0, "依赖性标准分");
            Label depend_a = new Label(index++, 0, "依赖性参考提示");

            Label domi_o = new Label(index++, 0, "支配性原始分");
            Label domi_s = new Label(index++, 0, "支配性标准分");
            Label domi_a = new Label(index++, 0, "支配性参考提示");

            Label respon_o = new Label(index++, 0, "社会责任原始分");
            Label respon_s = new Label(index++, 0, "社会责任标准分");
            Label respon_a = new Label(index++, 0, "社会责任参考提示");

            Label control_o = new Label(index++, 0, "控制力原始分");
            Label control_s = new Label(index++, 0, "控制力标准分");
            Label control_a = new Label(index++, 0, "控制力参考提示");

            Label differ_o = new Label(index++, 0, "不一致性原始分");
            Label differ_a = new Label(index++, 0, "不一致性参考提示");
            Label answer = new Label(index++, 0, "答题数据");
            Label answer_time = new Label(index++, 0, "答题用时");

            ws.addCell(mani_o);
            ws.addCell(mani_s);
            ws.addCell(mani_a);
            ws.addCell(depend_o);
            ws.addCell(depend_s);
            ws.addCell(depend_a);
            ws.addCell(domi_o);
            ws.addCell(domi_s);
            ws.addCell(domi_a);
            ws.addCell(respon_o);
            ws.addCell(respon_s);
            ws.addCell(respon_a);
            ws.addCell(control_o);
            ws.addCell(control_s);
            ws.addCell(control_a);
            ws.addCell(differ_o);
            ws.addCell(differ_a);
            ws.addCell(answer);
            ws.addCell(answer_time);
            basePaintingExtFieldRecord(channelExtFieldRecord, ws, --index);
        } else if ("399".equals(formName)) {
            Label differ_o = new Label(index++, 0, "不一致性原始分");
            Label differ_a = new Label(index++, 0, "不一致性参考提示");
            Label answer = new Label(index++, 0, "答题数据");
            Label answer_time = new Label(index++, 0, "答题用时");
            ws.addCell(answer);
            ws.addCell(differ_o);
            ws.addCell(differ_a);
            ws.addCell(answer_time);
            basePaintingExtFieldRecord(channelExtFieldRecord, ws, --index);
        }
        ws.addCell(table_chinese_name);
        ws.addCell(ex_user_name);
        ws.addCell(ex_real_name);
        ws.addCell(ex_nick_name);
        ws.addCell(ex_user_phone);
        ws.addCell(ex_user_gender);
        ws.addCell(ex_user_birth);
        ws.addCell(date);
        ws.addCell(user_whole_name);
        ws.addCell(report_prompt);
        ws.addCell(ex_report_level);

        ws.addCell(lie_o);
        ws.addCell(lie_s);
        ws.addCell(lie_a);
        ws.addCell(infra_o);
        ws.addCell(infra_s);
        ws.addCell(infra_a);
        ws.addCell(defen_o);
        ws.addCell(defen_s);
        ws.addCell(defen_a);
        ws.addCell(hypoch_o);
        ws.addCell(hypoch_s);
        ws.addCell(hypoch_a);
        ws.addCell(depre_o);
        ws.addCell(depre_s);
        ws.addCell(depre_a);
        ws.addCell(hyste_o);
        ws.addCell(hyste_s);
        ws.addCell(hyste_a);
        ws.addCell(psychop_o);
        ws.addCell(psychop_s);
        ws.addCell(psychop_a);
        ws.addCell(mascu_o);
        ws.addCell(mascu_s);
        ws.addCell(mascu_a);
        ws.addCell(para_o);
        ws.addCell(para_s);
        ws.addCell(para_a);
        ws.addCell(psychas_o);
        ws.addCell(psychas_s);
        ws.addCell(psychas_a);
        ws.addCell(schi_o);
        ws.addCell(schi_s);
        ws.addCell(schi_a);
        ws.addCell(hypoma_o);
        ws.addCell(hypoma_s);
        ws.addCell(hypoma_a);
        ws.addCell(social_o);
        ws.addCell(social_s);
        ws.addCell(social_a);
    }

    private static void fillData(WritableSheet ws, List<Map<String, Object>> reports, int i, String formName, List<ExtFieldRecord> channelExtFieldRecord)
            throws WriteException, RowsExceededException {

        Label table_chinese_name_i = null;

        table_chinese_name_i = new Label(0, i + 1, "明尼苏达多相人格测验(" + formName + "题)");
        Label user_name_i = null;
        if (reports.get(i).get("user_name") != null && !reports.get(i).get("user_name").toString().equals("")) {
            user_name_i = new Label(1, i + 1, reports.get(i).get("user_name").toString());
        } else {
            user_name_i = new Label(1, i + 1, "暂无");
        }
        Label real_name_i = null;
        if (reports.get(i).get("real_name") != null && !reports.get(i).get("real_name").toString().equals("")) {
            real_name_i = new Label(2, i + 1, reports.get(i).get("real_name").toString());
        } else {
            real_name_i = new Label(2, i + 1, "暂无");
        }
        Label nick_name_i = null;
        if (reports.get(i).get("nick_name") != null && !reports.get(i).get("nick_name").toString().equals("")) {
            nick_name_i = new Label(3, i + 1, reports.get(i).get("nick_name").toString());
        } else {
            nick_name_i = new Label(3, i + 1, "暂无");
        }
        Label user_phone_i = null;
        if (reports.get(i).get("user_phone") != null && !reports.get(i).get("user_phone").toString().equals("")) {
            user_phone_i = new Label(4, i + 1, reports.get(i).get("user_phone").toString());
        } else {
            user_phone_i = new Label(4, i + 1, "暂无");
        }

        Label user_gender_i = null;
        if (reports.get(i).get("user_gender") != null && !reports.get(i).get("user_gender").toString().equals("")) {
            user_gender_i = new Label(5, i + 1, reports.get(i).get("user_gender").toString().equals("1") ? "男"
                    : reports.get(i).get("user_gender").toString().equals("2") ? "女" : "暂无");
        } else {
            user_gender_i = new Label(5, i + 1, "暂无");
        }

        Label user_birth_i = null;
        if (reports.get(i).get("user_birth") != null && !reports.get(i).get("user_birth").toString().equals("")) {
            Long birth = new Long(reports.get(i).get("user_birth").toString())*1000;
            Date birthdate = new Date(birth);
            user_birth_i = new Label(6, i + 1, new SimpleDateFormat("yyyy-MM-dd").format(birthdate));
        } else {
            user_birth_i = new Label(6, i + 1, "暂无");
        }

        Label date_i = null;
        if (reports.get(i).get("date") != null && !reports.get(i).get("date").toString().equals("")) {
            date_i = new Label(7, i + 1, !reports.get(i).get("date").toString().isEmpty()
                    ? DateTimeUtil.getWholeStringFromUTC(Long.parseLong(reports.get(i).get("date").toString()) / 1000)
                    : "暂无");

        } else {
            date_i = new Label(7, i + 1, "暂无");
        }

        Label whole_name_i = getData(8, reports, i, "whole_name");

        Label report_prompt_i = null;
        if (reports.get(i).get("report_prompt") != null && !reports.get(i).get("report_prompt").toString().equals("")) {
            report_prompt_i = new Label(9, i + 1,
                    !reports.get(i).get("report_prompt").toString().isEmpty()
                            ? reports.get(i).get("report_prompt").toString()
                            : "暂无");
        } else {
            report_prompt_i = new Label(9, i + 1, "暂无");
        }

        Label report_level_i = null;
        if (reports.get(i).get("report_level") != null && !reports.get(i).get("report_level").toString().equals("")) {
            report_level_i = new Label(10, i + 1,
                    !reports.get(i).get("report_level").toString().isEmpty()
                            ? reports.get(i).get("report_level").toString()
                            : "暂无");
        } else {
            report_level_i = new Label(10, i + 1, "暂无");
        }

        Label answer_i = null;
        if (reports.get(i).get("answer") != null && !reports.get(i).get("answer").toString().equals("")) {
            if ("566".equals(formName)) {
                answer_i = new Label(67, i + 1,
                        !reports.get(i).get("answer").toString().isEmpty() ? reports.get(i).get("answer").toString()
                                : "暂无");
            } else if ("399".equals(formName)) {
                answer_i = new Label(52, i + 1,
                        !reports.get(i).get("answer").toString().isEmpty() ? reports.get(i).get("answer").toString()
                                : "暂无");
            }
        } else {
            if ("566".equals(formName)) {
                answer_i = new Label(67, i + 1, "暂无");
            } else if ("399".equals(formName)) {
                answer_i = new Label(52, i + 1, "暂无");
            }
        }

        Label answer_time_i = null;
        if (reports.get(i).get("answer_time") != null && !reports.get(i).get("answer_time").toString().equals("")) {
            if ("566".equals(formName)) {
                answer_time_i = new Label(68, i + 1,
                        !reports.get(i).get("answer_time").toString().isEmpty() ? DateTimeUtil.getStringFromSeconds(
                                Integer.parseInt(reports.get(i).get("answer_time").toString())) : "暂无");
            } else if ("399".equals(formName)) {
                answer_time_i = new Label(53, i + 1,
                        !reports.get(i).get("answer_time").toString().isEmpty() ? DateTimeUtil.getStringFromSeconds(
                                Integer.parseInt(reports.get(i).get("answer_time").toString())) : "暂无");
            }
        } else {
            if ("566".equals(formName)) {
                answer_time_i = new Label(68, i + 1, "暂无");
            } else if ("399".equals(formName)) {
                answer_time_i = new Label(53, i + 1, "暂无");
            }
        }

        Label lie_o_i = getData(11, reports, i, "lie_o");
        Label lie_s_i = getData(12, reports, i, "lie_s");
        Label lie_a_i = getData(13, reports, i, "lie_a");
        Label infra_o_i = getData(14, reports, i, "infra_o");
        Label infra_s_i = getData(15, reports, i, "infra_s");
        Label infra_a_i = getData(16, reports, i, "infra_a");
        Label defen_o_i = getData(17, reports, i, "defen_o");
        Label defen_s_i = getData(18, reports, i, "defen_s");
        Label defen_a_i = getData(19, reports, i, "defen_a");
        Label hypoch_o_i = getData(20, reports, i, "hypoch_o");
        Label hypoch_s_i = getData(21, reports, i, "hypoch_s");
        Label hypoch_a_i = getData(22, reports, i, "hypoch_a");
        Label depre_o_i = getData(23, reports, i, "depre_o");
        Label depre_s_i = getData(24, reports, i, "depre_s");
        Label depre_a_i = getData(25, reports, i, "depre_a");
        Label hyste_o_i = getData(26, reports, i, "hyste_o");
        Label hyste_s_i = getData(27, reports, i, "hyste_s");
        Label hyste_a_i = getData(28, reports, i, "hyste_a");
        Label psychop_o_i = getData(29, reports, i, "psychop_o");
        Label psychop_s_i = getData(30, reports, i, "psychop_s");
        Label psychop_a_i = getData(31, reports, i, "psychop_a");
        Label mascu_o_i = getData(32, reports, i, "mascu_o");
        Label mascu_s_i = getData(33, reports, i, "mascu_s");
        Label mascu_a_i = getData(34, reports, i, "mascu_a");
        Label para_o_i = getData(35, reports, i, "para_o");
        Label para_s_i = getData(36, reports, i, "para_s");
        Label para_a_i = getData(37, reports, i, "para_a");
        Label psychas_o_i = getData(38, reports, i, "psychas_o");
        Label psychas_s_i = getData(39, reports, i, "psychas_s");
        Label psychas_a_i = getData(40, reports, i, "psychas_a");
        Label schi_o_i = getData(41, reports, i, "schi_o");
        Label schi_s_i = getData(42, reports, i, "schi_s");
        Label schi_a_i = getData(43, reports, i, "schi_a");
        Label hypoma_o_i = getData(44, reports, i, "hypoma_o");
        Label hypoma_s_i = getData(45, reports, i, "hypoma_s");
        Label hypoma_a_i = getData(46, reports, i, "hypoma_a");
        Label social_o_i = getData(47, reports, i, "social_o");
        Label social_s_i = getData(48, reports, i, "social_s");
        Label social_a_i = getData(49, reports, i, "social_a");
        if ("566".equals(formName)) {
            Label mani_o_i = getData(50, reports, i, "mani_o");
            Label mani_s_i = getData(51, reports, i, "mani_s");
            Label mani_a_i = getData(52, reports, i, "mani_a");
            Label depend_o_i = getData(53, reports, i, "depend_o");
            Label depend_s_i = getData(54, reports, i, "depend_s");
            Label depend_a_i = getData(55, reports, i, "depend_a");
            Label domi_o_i = getData(56, reports, i, "domi_o");
            Label domi_s_i = getData(57, reports, i, "domi_s");
            Label domi_a_i = getData(58, reports, i, "domi_a");
            Label respon_o_i = getData(59, reports, i, "respon_o");
            Label respon_s_i = getData(60, reports, i, "respon_s");
            Label respon_a_i = getData(61, reports, i, "respon_a");
            Label control_o_i = getData(62, reports, i, "control_o");
            Label control_s_i = getData(63, reports, i, "control_s");
            Label control_a_i = getData(64, reports, i, "control_a");
            Label differ_o_i = getData(65, reports, i, "differ_o");
            Label differ_a_i = getData(66, reports, i, "differ_a");
            ws.addCell(mani_o_i);
            ws.addCell(mani_s_i);
            ws.addCell(mani_a_i);
            ws.addCell(depend_o_i);
            ws.addCell(depend_s_i);
            ws.addCell(depend_a_i);
            ws.addCell(domi_o_i);
            ws.addCell(domi_s_i);
            ws.addCell(domi_a_i);
            ws.addCell(respon_o_i);
            ws.addCell(respon_s_i);
            ws.addCell(respon_a_i);
            ws.addCell(control_o_i);
            ws.addCell(control_s_i);
            ws.addCell(control_a_i);
            ws.addCell(differ_o_i);
            ws.addCell(differ_a_i);
            Object ext_json = reports.get(i).get("ext_json");
            baseFillExtFieldRecord(channelExtFieldRecord, ws, 68, i, ext_json);
        } else if ("399".equals(formName)) {
            Label differ_o_i = getData(50, reports, i, "differ_o");
            Label differ_a_i = getData(51, reports, i, "differ_a");
            ws.addCell(differ_o_i);
            ws.addCell(differ_a_i);
            Object ext_json = reports.get(i).get("ext_json");
            baseFillExtFieldRecord(channelExtFieldRecord, ws, 53, i, ext_json);
        }

        ws.addCell(table_chinese_name_i);
        ws.addCell(user_name_i);
        ws.addCell(real_name_i);
        ws.addCell(nick_name_i);
        ws.addCell(user_phone_i);
        ws.addCell(user_gender_i);
        ws.addCell(user_birth_i);
        ws.addCell(date_i);
        ws.addCell(whole_name_i);
        ws.addCell(report_prompt_i);
        ws.addCell(report_level_i);
        ws.addCell(answer_i);
        ws.addCell(answer_time_i);
        ws.addCell(lie_o_i);
        ws.addCell(lie_s_i);
        ws.addCell(lie_a_i);
        ws.addCell(infra_o_i);
        ws.addCell(infra_s_i);
        ws.addCell(infra_a_i);
        ws.addCell(defen_o_i);
        ws.addCell(defen_s_i);
        ws.addCell(defen_a_i);
        ws.addCell(hypoch_o_i);
        ws.addCell(hypoch_s_i);
        ws.addCell(hypoch_a_i);
        ws.addCell(depre_o_i);
        ws.addCell(depre_s_i);
        ws.addCell(depre_a_i);
        ws.addCell(hyste_o_i);
        ws.addCell(hyste_s_i);
        ws.addCell(hyste_a_i);
        ws.addCell(psychop_o_i);
        ws.addCell(psychop_s_i);
        ws.addCell(psychop_a_i);
        ws.addCell(mascu_o_i);
        ws.addCell(mascu_s_i);
        ws.addCell(mascu_a_i);
        ws.addCell(para_o_i);
        ws.addCell(para_s_i);
        ws.addCell(para_a_i);
        ws.addCell(psychas_o_i);
        ws.addCell(psychas_s_i);
        ws.addCell(psychas_a_i);
        ws.addCell(schi_o_i);
        ws.addCell(schi_s_i);
        ws.addCell(schi_a_i);
        ws.addCell(hypoma_o_i);
        ws.addCell(hypoma_s_i);
        ws.addCell(hypoma_a_i);
        ws.addCell(social_o_i);
        ws.addCell(social_s_i);
        ws.addCell(social_a_i);
    }

    private static Label getData(int tableNum, List<Map<String, Object>> reports, int i, String name) {
        Label whole_name_i;
        if (reports.get(i).get(name) != null && !reports.get(i).get(name).toString().equals("")) {
            whole_name_i = new Label(tableNum, i + 1,
                    !reports.get(i).get(name).toString().isEmpty() ? reports.get(i).get(name).toString() : "");
        } else {
            whole_name_i = new Label(tableNum, i + 1, "");
        }
        return whole_name_i;
    }

    private static void basePainting(WritableSheet ws) throws WriteException, RowsExceededException {
        Label table_chinese_name = new Label(0, 0, "量表名称");
        Label ex_user_name = new Label(1, 0, "用户名");
        Label ex_real_name = new Label(2, 0, "真实姓名");
        Label ex_nick_name = new Label(3, 0, "微信昵称");
        Label ex_user_phone = new Label(4, 0, "手机号");
        Label ex_user_gender = new Label(5, 0, "性别");
        Label ex_user_birth = new Label(6, 0, "出生日期");
        Label date = new Label(7, 0, "完成时间");
        Label user_whole_name = new Label(8, 0, "组织机构");
        Label report_prompt = new Label(9, 0, "报告总评");
        Label ex_report_level = new Label(10, 0, "风险等级");
        Label answer = new Label(11, 0, "答题数据");
        Label answer_time = new Label(12, 0, "答题用时");

        ws.addCell(table_chinese_name);
        ws.addCell(ex_user_name);
        ws.addCell(ex_real_name);
        ws.addCell(ex_nick_name);
        ws.addCell(ex_user_phone);
        ws.addCell(ex_user_gender);
        ws.addCell(ex_user_birth);
        ws.addCell(date);
        ws.addCell(user_whole_name);
        ws.addCell(report_prompt);
        ws.addCell(ex_report_level);
        ws.addCell(answer);
        ws.addCell(answer_time);

    }

    private static void baseFillData(WritableSheet ws, List<Map<String, Object>> reports, int i)
            throws WriteException, RowsExceededException {

        Label table_chinese_name_i = null;
        if (reports.get(i).get("table_chinese_name") != null
                && !reports.get(i).get("table_chinese_name").toString().equals("")) {
            table_chinese_name_i = new Label(0, i + 1, reports.get(i).get("table_chinese_name").toString());
        } else {
            table_chinese_name_i = new Label(0, i + 1, "暂无");
        }
        Label user_name_i = null;
        if (reports.get(i).get("user_name") != null && !reports.get(i).get("user_name").toString().equals("")) {
            user_name_i = new Label(1, i + 1, reports.get(i).get("user_name").toString());
        } else {
            user_name_i = new Label(1, i + 1, "暂无");
        }
        Label real_name_i = null;
        if (reports.get(i).get("real_name") != null && !reports.get(i).get("real_name").toString().equals("")) {
            real_name_i = new Label(2, i + 1, reports.get(i).get("real_name").toString());
        } else {
            real_name_i = new Label(2, i + 1, "暂无");
        }
        Label nick_name_i = null;
        if (reports.get(i).get("nick_name") != null && !reports.get(i).get("nick_name").toString().equals("")) {
            nick_name_i = new Label(3, i + 1, reports.get(i).get("nick_name").toString());
        } else {
            nick_name_i = new Label(3, i + 1, "暂无");
        }
        Label user_phone_i = null;
        if (reports.get(i).get("user_phone") != null && !reports.get(i).get("user_phone").toString().equals("")) {
            user_phone_i = new Label(4, i + 1, reports.get(i).get("user_phone").toString());
        } else {
            user_phone_i = new Label(4, i + 1, "暂无");
        }

        Label user_gender_i = null;
        if (reports.get(i).get("user_gender") != null && !reports.get(i).get("user_gender").toString().equals("")) {
            user_gender_i = new Label(5, i + 1, reports.get(i).get("user_gender").toString().equals("1") ? "男"
                    : reports.get(i).get("user_gender").toString().equals("2") ? "女" : "暂无");
        } else {
            user_gender_i = new Label(5, i + 1, "暂无");
        }

        Label user_birth_i = null;
        if (reports.get(i).get("user_birth") != null && !reports.get(i).get("user_birth").toString().equals("")) {
            Long birth = new Long(reports.get(i).get("user_birth").toString())*1000;
            Date date = new Date(birth);
            user_birth_i = new Label(6, i + 1, new SimpleDateFormat("yyyy-MM-dd").format(date));
        } else {
            user_birth_i = new Label(6, i + 1, "暂无");
        }

        Label date_i = null;
        if (reports.get(i).get("date") != null && !reports.get(i).get("date").toString().equals("")) {
            date_i = new Label(7, i + 1, !reports.get(i).get("date").toString().isEmpty()
                    ? DateTimeUtil.getWholeStringFromUTC(Long.parseLong(reports.get(i).get("date").toString()) / 1000)
                    : "暂无");

        } else {
            date_i = new Label(7, i + 1, "暂无");
        }

        Label whole_name_i = getData(8, reports, i, "whole_name");

        Label report_prompt_i = null;
        if (reports.get(i).get("report_prompt") != null && !reports.get(i).get("report_prompt").toString().equals("")) {
            report_prompt_i = new Label(9, i + 1,
                    !reports.get(i).get("report_prompt").toString().isEmpty()
                            ? reports.get(i).get("report_prompt").toString()
                            : "暂无");
        } else {
            report_prompt_i = new Label(9, i + 1, "暂无");
        }

        Label report_level_i = null;
        if (reports.get(i).get("report_level") != null && !reports.get(i).get("report_level").toString().equals("")) {
            report_level_i = new Label(10, i + 1,
                    !reports.get(i).get("report_level").toString().isEmpty()
                            ? reports.get(i).get("report_level").toString()
                            : "暂无");
        } else {
            report_level_i = new Label(10, i + 1, "暂无");
        }

        Label answer_i = null;
        if (reports.get(i).get("answer") != null && !reports.get(i).get("answer").toString().equals("")) {

            answer_i = new Label(11, i + 1,
                    !reports.get(i).get("answer").toString().isEmpty() ? reports.get(i).get("answer").toString()
                            : "暂无");
        } else {
            answer_i = new Label(11, i + 1, "暂无");
        }

        Label answer_time_i = null;
        if (reports.get(i).get("answer_time") != null && !reports.get(i).get("answer_time").toString().equals("")) {

            answer_time_i = new Label(12, i + 1, !reports.get(i).get("answer_time").toString().isEmpty()
                    ? DateTimeUtil.getStringFromSeconds(Integer.parseInt(reports.get(i).get("answer_time").toString()))
                    : "暂无");
        } else {
            answer_time_i = new Label(12, i + 1, "暂无");
        }
        ws.addCell(table_chinese_name_i);
        ws.addCell(user_name_i);
        ws.addCell(real_name_i);
        ws.addCell(nick_name_i);
        ws.addCell(user_phone_i);
        ws.addCell(user_gender_i);
        ws.addCell(user_birth_i);
        ws.addCell(date_i);
        ws.addCell(whole_name_i);
        ws.addCell(report_prompt_i);
        ws.addCell(report_level_i);
        ws.addCell(answer_i);
        ws.addCell(answer_time_i);

    }

    private static void paintingForPSQI(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        /**
         * btgnwl_a //白天功能紊乱参考 btgnwl_s //白天功能紊乱总分 smcxx_a //睡眠持续性参考 smcxx_s//睡眠持续性总分
         * smqfq_a //睡眠潜伏期参考 smqfq_s //睡眠潜伏期总分 smwl_a //睡眠紊乱参考 smwl_s //睡眠紊乱总分 smzlzs_a
         * //睡眠质量指数参考 smzlzs_s //睡眠质量指数总评 sysmyw_a //使用睡眠药物参考 sysmyw_s //使用睡眠药物总分
         * xgxsm_a //习惯性睡眠参考 xgxsm_s//习惯性睡眠效率总分 yxsm_a //影响睡眠的其他原因 zgsmzl_a// 主观睡眠质量非常差
         * zgsmzl_s //主观睡眠质量总分
         */

        Label btgnwl_a = new Label(++index, 0, "白天功能紊乱参考");
        Label btgnwl_s = new Label(++index, 0, "白天功能紊乱总分");
        Label smcxx_a = new Label(++index, 0, "睡眠持续性参考");
        Label smcxx_s = new Label(++index, 0, "睡眠持续性总分");
        Label smqfq_a = new Label(++index, 0, "睡眠潜伏期参考");
        Label smqfq_s = new Label(++index, 0, "睡眠潜伏期总分");
        Label smwl_a = new Label(++index, 0, "睡眠紊乱参考");
        Label smwl_s = new Label(++index, 0, "睡眠紊乱总分");
        Label smzlzs_a = new Label(++index, 0, "睡眠质量指数参考");
        Label smzlzs_s = new Label(++index, 0, "睡眠质量指数总评");
        Label sysmyw_a = new Label(++index, 0, "使用睡眠药物参考");
        Label sysmyw_s = new Label(++index, 0, "使用睡眠药物总分");
        Label xgxsm_a = new Label(++index, 0, "习惯性睡眠参考");
        Label xgxsm_s = new Label(++index, 0, "习惯性睡眠效率总分");
        Label yxsm_a = new Label(++index, 0, "影响睡眠的其他原因");
        Label zgsmzl_a = new Label(++index, 0, "主观睡眠质量参考");
        Label zgsmzl_s = new Label(++index, 0, "主观睡眠质量总分");

        ws.addCell(btgnwl_a);
        ws.addCell(btgnwl_s);
        ws.addCell(smcxx_a);
        ws.addCell(smcxx_s);
        ws.addCell(smqfq_a);
        ws.addCell(smqfq_s);
        ws.addCell(smwl_a);
        ws.addCell(smwl_s);
        ws.addCell(smzlzs_a);
        ws.addCell(smzlzs_s);
        ws.addCell(sysmyw_a);
        ws.addCell(sysmyw_s);
        ws.addCell(xgxsm_a);
        ws.addCell(xgxsm_s);
        ws.addCell(yxsm_a);
        ws.addCell(zgsmzl_a);
        ws.addCell(zgsmzl_s);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForPSQI(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label btgnwl_a_i = getData(++index, reports, i, "btgnwl_a");
        Label btgnwl_s_i = getData(++index, reports, i, "btgnwl_s");
        Label smcxx_a_i = getData(++index, reports, i, "smcxx_a");
        Label smcxx_s_i = getData(++index, reports, i, "smcxx_s");
        Label smqfq_a_i = getData(++index, reports, i, "smqfq_a");
        Label smqfq_s_i = getData(++index, reports, i, "smqfq_s");
        Label smwl_a_i = getData(++index, reports, i, "smwl_a");
        Label smwl_s_i = getData(++index, reports, i, "smwl_s");
        Label smzlzs_a_i = getData(++index, reports, i, "smzlzs_a");
        Label smzlzs_s_i = getData(++index, reports, i, "smzlzs_s");
        Label sysmyw_a_i = getData(++index, reports, i, "sysmyw_a");
        Label sysmyw_s_i = getData(++index, reports, i, "sysmyw_s");
        Label xgxsm_a_i = getData(++index, reports, i, "xgxsm_a");
        Label xgxsm_s_i = getData(++index, reports, i, "xgxsm_s");
        Label yxsm_a_i = getData(++index, reports, i, "yxsm_a");
        Label zgsmzl_a_i = getData(++index, reports, i, "zgsmzl_a");
        Label zgsmzl_s_i = getData(++index, reports, i, "zgsmzl_s");

        ws.addCell(btgnwl_a_i);
        ws.addCell(btgnwl_s_i);
        ws.addCell(smcxx_a_i);
        ws.addCell(smcxx_s_i);
        ws.addCell(smqfq_a_i);
        ws.addCell(smqfq_s_i);
        ws.addCell(smwl_a_i);
        ws.addCell(smwl_s_i);
        ws.addCell(smzlzs_a_i);
        ws.addCell(smzlzs_s_i);
        ws.addCell(sysmyw_a_i);
        ws.addCell(sysmyw_s_i);
        ws.addCell(xgxsm_a_i);
        ws.addCell(xgxsm_s_i);
        ws.addCell(yxsm_a_i);
        ws.addCell(zgsmzl_a_i);
        ws.addCell(zgsmzl_s_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForLSAS(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label hp_o = new Label(++index, 0, "害怕,焦虑总分");
        Label hb_o = new Label(++index, 0, "回避总分");
        Label total_o = new Label(++index, 0, "合计总分");
        Label total_a = new Label(++index, 0, "参考诊断");
        ws.addCell(hp_o);
        ws.addCell(hb_o);
        ws.addCell(total_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);

    }

    private static void fillDataForLSAS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label hp_o_i = getData(++index, reports, i, "hp_o");
        Label hb_o_i = getData(++index, reports, i, "hb_o");
        Label total_o_i = getData(++index, reports, i, "total_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(hp_o_i);
        ws.addCell(hb_o_i);
        ws.addCell(total_o_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForYBOCS(Integer index, WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label qpsw_o = new Label(++index, 0, "强迫思维计分");
        Label qpxw_o = new Label(++index, 0, "强迫行为计分");
        Label total_o = new Label(++index, 0, "总分");
        ws.addCell(qpsw_o);
        ws.addCell(qpxw_o);
        ws.addCell(total_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForYBOCS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label qpsw_o_i = getData(++index, reports, i, "qpsw_o");
        Label qpxw_o_i = getData(++index, reports, i, "qpxw_o");
        Label total_o_i = getData(++index, reports, i, "total_o");

        ws.addCell(qpsw_o_i);
        ws.addCell(qpxw_o_i);
        ws.addCell(total_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForEPQC(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label jsz_o = new Label(++index, 0, "精神质原始分");
        Label jsz_s = new Label(++index, 0, "精神质标准分");
        Label nwx_o = new Label(++index, 0, "内外向原始分");
        Label nwx_s = new Label(++index, 0, "精内外向标准分");
        Label sjz_o = new Label(++index, 0, "神经质原始分");
        Label sjz_s = new Label(++index, 0, "神经质标准分");
        Label yscd_o = new Label(++index, 0, "掩饰程度原始分");
        Label yscd_s = new Label(++index, 0, "掩饰程度标准分");
        ws.addCell(jsz_o);
        ws.addCell(jsz_s);
        ws.addCell(nwx_o);
        ws.addCell(nwx_s);
        ws.addCell(sjz_o);
        ws.addCell(sjz_s);
        ws.addCell(yscd_o);
        ws.addCell(yscd_s);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForEPQC(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label jsz_o_i = getData(++index, reports, i, "jsz_o");
        Label jsz_s_i = getData(++index, reports, i, "jsz_s");
        Label nwx_o_i = getData(++index, reports, i, "nwx_o");
        Label nwx_s_i = getData(++index, reports, i, "nwx_s");
        Label sjz_o_i = getData(++index, reports, i, "sjz_o");
        Label sjz_s_i = getData(++index, reports, i, "sjz_s");
        Label yscd_o_i = getData(++index, reports, i, "yscd_o");
        Label yscd_s_i = getData(++index, reports, i, "yscd_s");

        ws.addCell(jsz_o_i);
        ws.addCell(jsz_s_i);
        ws.addCell(nwx_o_i);
        ws.addCell(nwx_s_i);
        ws.addCell(sjz_o_i);
        ws.addCell(sjz_s_i);
        ws.addCell(yscd_o_i);
        ws.addCell(yscd_s_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForEPQD(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label jsz_o = new Label(++index, 0, "精神质原始分");
        Label jsz_s = new Label(++index, 0, "精神质标准分");
        Label nwx_o = new Label(++index, 0, "内外向原始分");
        Label nwx_s = new Label(++index, 0, "精内外向标准分");
        Label sjz_o = new Label(++index, 0, "神经质原始分");
        Label sjz_s = new Label(++index, 0, "神经质标准分");
        Label yscd_o = new Label(++index, 0, "掩饰程度原始分");
        Label yscd_s = new Label(++index, 0, "掩饰程度标准分");
        ws.addCell(jsz_o);
        ws.addCell(jsz_s);
        ws.addCell(nwx_o);
        ws.addCell(nwx_s);
        ws.addCell(sjz_o);
        ws.addCell(sjz_s);
        ws.addCell(yscd_o);
        ws.addCell(yscd_s);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForEPQD(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label jsz_o_i = getData(++index, reports, i, "jsz_o");
        Label jsz_s_i = getData(++index, reports, i, "jsz_s");
        Label nwx_o_i = getData(++index, reports, i, "nwx_o");
        Label nwx_s_i = getData(++index, reports, i, "nwx_s");
        Label sjz_o_i = getData(++index, reports, i, "sjz_o");
        Label sjz_s_i = getData(++index, reports, i, "sjz_s");
        Label yscd_o_i = getData(++index, reports, i, "yscd_o");
        Label yscd_s_i = getData(++index, reports, i, "yscd_s");

        ws.addCell(jsz_o_i);
        ws.addCell(jsz_s_i);
        ws.addCell(nwx_o_i);
        ws.addCell(nwx_s_i);
        ws.addCell(sjz_o_i);
        ws.addCell(sjz_s_i);
        ws.addCell(yscd_o_i);
        ws.addCell(yscd_s_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingFor16PF(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label chx_o = new Label(++index, 0, "聪慧性原始分");
        Label chx_s = new Label(++index, 0, "聪慧性标准分");
        Label cqx_o = new Label(++index, 0, "恃强性原始分");
        Label cqx_s = new Label(++index, 0, "恃强性标准分");
        Label czlgx_o = new Label(++index, 0, "创造力个性因素标准分");
        Label dlx_o = new Label(++index, 0, "独立性原始分");
        Label dlx_s = new Label(++index, 0, "独立性标准分");
        Label gqax_o = new Label(++index, 0, "感情用事与安祥机警型");
        Label gwx_o = new Label(++index, 0, "敢为性原始分");
        Label gwx_s = new Label(++index, 0, "敢为性标准分");
        Label hxx_o = new Label(++index, 0, "幻想性原始分");
        Label hxx_s = new Label(++index, 0, "幻想性标准分");
        Label hyx_o = new Label(++index, 0, "怀疑性原始分");
        Label hyx_s = new Label(++index, 0, "怀疑性标准分");
        Label jzx_o = new Label(++index, 0, "紧张性原始分");
        Label jzx_s = new Label(++index, 0, "紧张性标准分");
        Label lqx_o = new Label(++index, 0, "乐群性原始分");
        Label lqx_s = new Label(++index, 0, "乐群性标准分");
        Label mgx_o = new Label(++index, 0, "敏感性原始分");
        Label mgx_s = new Label(++index, 0, "敏感性标准分");
        Label nxywx_o = new Label(++index, 0, "内向与外向型标准分");
        Label qnygd_o = new Label(++index, 0, "怯懦与果断型标准分");
        Label sgx_o = new Label(++index, 0, "世故性原始分");
        Label sgx_s = new Label(++index, 0, "世故性标准分");
        Label syx_o = new Label(++index, 0, "实验性原始分");
        Label syx_s = new Label(++index, 0, "实验性标准分");
        Label syyjl_o = new Label(++index, 0, "适应与焦虑型标准分");
        Label wdx_o = new Label(++index, 0, "稳定性原始分");
        Label wdx_s = new Label(++index, 0, "稳定性标准分");
        Label xfx_o = new Label(++index, 0, "兴奋性原始分");
        Label xfx_s = new Label(++index, 0, "兴奋性标准分");
        Label xljk_o = new Label(++index, 0, "心理健康因素标准分");
        Label yhx_o = new Label(++index, 0, "有恒性原始分");
        Label yhx_s = new Label(++index, 0, "有恒性标准分");
        Label ylx_o = new Label(++index, 0, "忧虑性原始分");
        Label ylx_s = new Label(++index, 0, "忧虑性标准分");
        Label zlx_o = new Label(++index, 0, "自律性原始分");
        Label zlx_s = new Label(++index, 0, "自律性标准分");
        Label zxhj_o = new Label(++index, 0, "新环境中有成长能力的个性因素");
        Label zyycj_o = new Label(++index, 0, "专业有成就感者的个性因素");
        ws.addCell(chx_o);
        ws.addCell(chx_s);
        ws.addCell(cqx_o);
        ws.addCell(cqx_s);
        ws.addCell(czlgx_o);
        ws.addCell(dlx_o);
        ws.addCell(dlx_s);
        ws.addCell(gqax_o);
        ws.addCell(gwx_o);
        ws.addCell(gwx_s);
        ws.addCell(hxx_o);
        ws.addCell(hxx_s);
        ws.addCell(hyx_o);
        ws.addCell(hyx_s);
        ws.addCell(jzx_o);
        ws.addCell(jzx_s);
        ws.addCell(lqx_o);
        ws.addCell(lqx_s);
        ws.addCell(mgx_o);
        ws.addCell(mgx_s);
        ws.addCell(nxywx_o);
        ws.addCell(qnygd_o);
        ws.addCell(sgx_o);
        ws.addCell(sgx_s);
        ws.addCell(syx_o);
        ws.addCell(syx_s);
        ws.addCell(syyjl_o);
        ws.addCell(wdx_o);
        ws.addCell(wdx_s);
        ws.addCell(xfx_o);
        ws.addCell(xfx_s);
        ws.addCell(xljk_o);
        ws.addCell(yhx_o);
        ws.addCell(yhx_s);
        ws.addCell(ylx_o);
        ws.addCell(ylx_s);
        ws.addCell(zlx_o);
        ws.addCell(zlx_s);
        ws.addCell(zxhj_o);
        ws.addCell(zyycj_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataFor16PF(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label chx_o_i = getData(++index, reports, i, "chx_o");
        Label chx_s_i = getData(++index, reports, i, "chx_s");
        Label cqx_o_i = getData(++index, reports, i, "cqx_o");
        Label cqx_s_i = getData(++index, reports, i, "cqx_s");
        Label czlgx_o_i = getData(++index, reports, i, "czlgx_o");
        Label dlx_o_i = getData(++index, reports, i, "dlx_o");
        Label dlx_s_i = getData(++index, reports, i, "dlx_s");
        Label gqax_o_i = getData(++index, reports, i, "gqax_o");
        Label gwx_o_i = getData(++index, reports, i, "gwx_o");
        Label gwx_s_i = getData(++index, reports, i, "gwx_s");
        Label hxx_o_i = getData(++index, reports, i, "hxx_o");
        Label hxx_s_i = getData(++index, reports, i, "hxx_s");
        Label hyx_o_i = getData(++index, reports, i, "hyx_o");
        Label hyx_s_i = getData(++index, reports, i, "hyx_s");
        Label jzx_o_i = getData(++index, reports, i, "jzx_o");
        Label jzx_s_i = getData(++index, reports, i, "jzx_s");
        Label lqx_o_i = getData(++index, reports, i, "lqx_o");
        Label lqx_s_i = getData(++index, reports, i, "lqx_s");
        Label mgx_o_i = getData(++index, reports, i, "mgx_o");
        Label mgx_s_i = getData(++index, reports, i, "mgx_s");
        Label nxywx_o_i = getData(++index, reports, i, "nxywx_o");
        Label qnygd_o_i = getData(++index, reports, i, "qnygd_o");
        Label sgx_o_i = getData(++index, reports, i, "sgx_o");
        Label sgx_s_i = getData(++index, reports, i, "sgx_s");
        Label syx_o_i = getData(++index, reports, i, "syx_o");
        Label syx_s_i = getData(++index, reports, i, "syx_s");
        Label syyjl_o_i = getData(++index, reports, i, "syyjl_o");
        Label wdx_o_i = getData(++index, reports, i, "wdx_o");
        Label wdx_s_i = getData(++index, reports, i, "wdx_s");
        Label xfx_o_i = getData(++index, reports, i, "xfx_o");
        Label xfx_s_i = getData(++index, reports, i, "xfx_s");
        Label xljk_o_i = getData(++index, reports, i, "xljk_o");
        Label yhx_o_i = getData(++index, reports, i, "yhx_o");
        Label yhx_s_i = getData(++index, reports, i, "yhx_s");
        Label ylx_o_i = getData(++index, reports, i, "ylx_o");
        Label ylx_s_i = getData(++index, reports, i, "ylx_s");
        Label zlx_o_i = getData(++index, reports, i, "zlx_o");
        Label zlx_s_i = getData(++index, reports, i, "zlx_s");
        Label zxhj_o_i = getData(++index, reports, i, "zxhj_o");
        Label zyycj_o_i = getData(++index, reports, i, "zyycj_o");

        ws.addCell(chx_o_i);
        ws.addCell(chx_s_i);
        ws.addCell(cqx_o_i);
        ws.addCell(cqx_s_i);
        ws.addCell(czlgx_o_i);
        ws.addCell(dlx_o_i);
        ws.addCell(dlx_s_i);
        ws.addCell(gqax_o_i);
        ws.addCell(gwx_o_i);
        ws.addCell(gwx_s_i);
        ws.addCell(hxx_o_i);
        ws.addCell(hxx_s_i);
        ws.addCell(hyx_o_i);
        ws.addCell(hyx_s_i);
        ws.addCell(jzx_o_i);
        ws.addCell(jzx_s_i);
        ws.addCell(lqx_o_i);
        ws.addCell(lqx_s_i);
        ws.addCell(mgx_o_i);
        ws.addCell(mgx_s_i);
        ws.addCell(nxywx_o_i);
        ws.addCell(qnygd_o_i);
        ws.addCell(sgx_o_i);
        ws.addCell(sgx_s_i);
        ws.addCell(syx_o_i);
        ws.addCell(syx_s_i);
        ws.addCell(syyjl_o_i);
        ws.addCell(wdx_o_i);
        ws.addCell(wdx_s_i);
        ws.addCell(xfx_o_i);
        ws.addCell(xfx_s_i);
        ws.addCell(xljk_o_i);
        ws.addCell(yhx_o_i);
        ws.addCell(yhx_s_i);
        ws.addCell(ylx_o_i);
        ws.addCell(ylx_s_i);
        ws.addCell(zlx_o_i);
        ws.addCell(zlx_s_i);
        ws.addCell(zxhj_o_i);
        ws.addCell(zyycj_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForBRMS(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总分");
        Label hj_o = new Label(++index, 0, "幻觉");
        Label wx_o = new Label(++index, 0, "妄想");
        Label total_a = new Label(++index, 0, "诊断结果");
        ws.addCell(total_o);
        ws.addCell(hj_o);
        ws.addCell(wx_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForBRMS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label hj_o_i = getData(++index, reports, i, "hj_o");
        Label wx_o_i = getData(++index, reports, i, "wx_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(total_o_i);
        ws.addCell(hj_o_i);
        ws.addCell(wx_o_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForSAS(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_a = new Label(++index, 0, "诊断结果");
        Label total_o = new Label(++index, 0, "总粗分");
        Label total_s = new Label(++index, 0, "标准总分");
        ws.addCell(total_a);
        ws.addCell(total_o);
        ws.addCell(total_s);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForSAS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_a_i = getData(++index, reports, i, "total_a");
        Label total_o_i = getData(++index, reports, i, "total_o");
        Label total_s_i = getData(++index, reports, i, "total_s");

        ws.addCell(total_a_i);
        ws.addCell(total_o_i);
        ws.addCell(total_s_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForSDS(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总粗分");
        Label total_s = new Label(++index, 0, "标准总分");
        Label total_a = new Label(++index, 0, "参考诊断");
        ws.addCell(total_o);
        ws.addCell(total_s);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForSDS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label total_s_i = getData(++index, reports, i, "total_s");
        Label total_a_i = getData(++index, reports, i, "total_a");
        ws.addCell(total_o_i);
        ws.addCell(total_s_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForSF36(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label sljn_o = new Label(++index, 0, "生理机能原始分");
        Label sljn_s = new Label(++index, 0, "生理机能标准分");
        Label slzn_o = new Label(++index, 0, "生理职能原始分");
        Label slzn_s = new Label(++index, 0, "生理职能标准分");
        Label qttt_o = new Label(++index, 0, "躯体疼痛原始分");
        Label qttt_s = new Label(++index, 0, "躯体疼痛标准分");
        Label ybjkzk_s = new Label(++index, 0, "一般健康状况原始分");
        Label ybjkzk_o = new Label(++index, 0, "一般健康状况标准分");
        Label jl_o = new Label(++index, 0, "精力原始分");
        Label jl_s = new Label(++index, 0, "精力标准分");
        Label shgn_o = new Label(++index, 0, "社会功能原始分");
        Label shgn_s = new Label(++index, 0, "社会功能标准分");
        Label qgzn_o = new Label(++index, 0, "情感职能原始分");
        Label qgzn_s = new Label(++index, 0, "情感职能标准分");
        Label jsjk_o = new Label(++index, 0, "精神健康原始分");
        Label jsjk_s = new Label(++index, 0, "精神健康标准分");
        Label jkbh_a = new Label(++index, 0, "健康变化情况");

        ws.addCell(sljn_o);
        ws.addCell(sljn_s);
        ws.addCell(slzn_o);
        ws.addCell(slzn_s);
        ws.addCell(qttt_o);
        ws.addCell(qttt_s);
        ws.addCell(ybjkzk_s);
        ws.addCell(ybjkzk_o);
        ws.addCell(jl_o);
        ws.addCell(jl_s);
        ws.addCell(shgn_o);
        ws.addCell(shgn_s);
        ws.addCell(qgzn_o);
        ws.addCell(qgzn_s);
        ws.addCell(jsjk_o);
        ws.addCell(jsjk_s);
        ws.addCell(jkbh_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForSF36(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label sljn_o_i = getData(++index, reports, i, "sljn_o");
        Label sljn_s_i = getData(++index, reports, i, "sljn_s");
        Label slzn_o_i = getData(++index, reports, i, "slzn_o");
        Label slzn_s_i = getData(++index, reports, i, "slzn_s");
        Label qttt_o_i = getData(++index, reports, i, "qttt_o");
        Label qttt_s_i = getData(++index, reports, i, "qttt_s");
        Label ybjkzk_s_i = getData(++index, reports, i, "ybjkzk_s");
        Label ybjkzk_o_i = getData(++index, reports, i, "ybjkzk_o");
        Label jl_o_i = getData(++index, reports, i, "jl_o");
        Label jl_s_i = getData(++index, reports, i, "jl_s");
        Label shgn_o_i = getData(++index, reports, i, "shgn_o");
        Label shgn_s_i = getData(++index, reports, i, "shgn_s");
        Label qgzn_o_i = getData(++index, reports, i, "qgzn_o");
        Label qgzn_s_i = getData(++index, reports, i, "qgzn_s");
        Label jsjk_o_i = getData(++index, reports, i, "jsjk_o");
        Label jsjk_s_i = getData(++index, reports, i, "jsjk_s");
        Label jkbh_a_i = getData(++index, reports, i, "jkbh_a");

        ws.addCell(sljn_o_i);
        ws.addCell(sljn_s_i);
        ws.addCell(slzn_o_i);
        ws.addCell(slzn_s_i);
        ws.addCell(qttt_o_i);
        ws.addCell(qttt_s_i);
        ws.addCell(ybjkzk_s_i);
        ws.addCell(ybjkzk_o_i);
        ws.addCell(jl_o_i);
        ws.addCell(jl_s_i);
        ws.addCell(shgn_o_i);
        ws.addCell(shgn_s_i);
        ws.addCell(qgzn_o_i);
        ws.addCell(qgzn_s_i);
        ws.addCell(jsjk_o_i);
        ws.addCell(jsjk_s_i);
        ws.addCell(jkbh_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForBPRS(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总粗分");
        Label jlyy_o = new Label(++index, 0, "焦虑忧郁因子分");
        Label jlyy_ave = new Label(++index, 0, "焦虑忧郁平均分");
        Label jlyy_a = new Label(++index, 0, "焦虑忧郁参考提示");
        Label qfhl_o = new Label(++index, 0, "缺乏活力因子分");
        Label qfhl_ave = new Label(++index, 0, "缺乏活力平均分");
        Label qfhl_a = new Label(++index, 0, "缺乏活力参考提示");
        Label swza_o = new Label(++index, 0, "思维障碍因子分");
        Label swza_ave = new Label(++index, 0, "思维障碍平均分");
        Label swza_a = new Label(++index, 0, "思维障碍参考提示");
        Label jhx_o = new Label(++index, 0, "激活性因子分");
        Label jhx_ave = new Label(++index, 0, "激活性平均分");
        Label jhx_a = new Label(++index, 0, "激活性参考提示");
        Label ddcy_o = new Label(++index, 0, "敌对猜疑因子分");
        Label ddcy_ave = new Label(++index, 0, "敌对猜疑平均分");
        Label ddcy_a = new Label(++index, 0, "敌对猜疑参考提示");

        ws.addCell(total_o);
        ws.addCell(jlyy_o);
        ws.addCell(jlyy_ave);
        ws.addCell(jlyy_a);
        ws.addCell(qfhl_o);
        ws.addCell(qfhl_ave);
        ws.addCell(qfhl_a);
        ws.addCell(swza_o);
        ws.addCell(swza_ave);
        ws.addCell(swza_a);
        ws.addCell(jhx_o);
        ws.addCell(jhx_ave);
        ws.addCell(jhx_a);
        ws.addCell(ddcy_o);
        ws.addCell(ddcy_ave);
        ws.addCell(ddcy_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForBPRS(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label jlyy_o_i = getData(++index, reports, i, "jlyy_o");
        Label jlyy_ave_i = getData(++index, reports, i, "jlyy_ave");
        Label jlyy_a_i = getData(++index, reports, i, "jlyy_a");
        Label qfhl_o_i = getData(++index, reports, i, "qfhl_o");
        Label qfhl_ave_i = getData(++index, reports, i, "qfhl_ave");
        Label qfhl_a_i = getData(++index, reports, i, "qfhl_a");
        Label swza_o_i = getData(++index, reports, i, "swza_o");
        Label swza_ave_i = getData(++index, reports, i, "swza_ave");
        Label swza_a_i = getData(++index, reports, i, "swza_a");
        Label jhx_o_i = getData(++index, reports, i, "jhx_o");
        Label jhx_ave_i = getData(++index, reports, i, "jhx_ave");
        Label jhx_a_i = getData(++index, reports, i, "jhx_a");
        Label ddcy_o_i = getData(++index, reports, i, "ddcy_o");
        Label ddcy_ave_i = getData(++index, reports, i, "ddcy_ave");
        Label ddcy_a_i = getData(++index, reports, i, "ddcy_a");

        ws.addCell(total_o_i);
        ws.addCell(jlyy_o_i);
        ws.addCell(jlyy_ave_i);
        ws.addCell(jlyy_a_i);
        ws.addCell(qfhl_o_i);
        ws.addCell(qfhl_ave_i);
        ws.addCell(qfhl_a_i);
        ws.addCell(swza_o_i);
        ws.addCell(swza_ave_i);
        ws.addCell(swza_a_i);
        ws.addCell(jhx_o_i);
        ws.addCell(jhx_ave_i);
        ws.addCell(jhx_a_i);
        ws.addCell(ddcy_o_i);
        ws.addCell(ddcy_ave_i);
        ws.addCell(ddcy_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForCMMSE(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总分");
        Label total_a = new Label(++index, 0, "诊断结果");

        ws.addCell(total_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForCMMSE(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(total_o_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForHAMA(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总分");
        Label qth_o = new Label(++index, 0, "躯体化焦虑");
        Label jsh_o = new Label(++index, 0, "精神性焦虑");
        Label total_a = new Label(++index, 0, "诊断结果");

        ws.addCell(total_o);
        ws.addCell(qth_o);
        ws.addCell(jsh_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForHAMA(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label qth_o_i = getData(++index, reports, i, "qth_o");
        Label jsh_o_i = getData(++index, reports, i, "jsh_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(total_o_i);
        ws.addCell(qth_o_i);
        ws.addCell(jsh_o_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForHAMD(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label total_o = new Label(++index, 0, "总粗分");
        Label jl_o = new Label(++index, 0, "焦虑/躯体化");
        Label tz_o = new Label(++index, 0, "体重");
        Label rsza_o = new Label(++index, 0, "认识障碍");
        Label rybh_o = new Label(++index, 0, "日夜变化");
        Label zz_o = new Label(++index, 0, "阻滞");
        Label smza_o = new Label(++index, 0, "睡眠障碍");

        Label jwg_o = new Label(++index, 0, "绝望感");
        Label qszz_o = new Label(++index, 0, "全身症状");
        Label total_a = new Label(++index, 0, "诊断结果");

        ws.addCell(total_o);
        ws.addCell(jl_o);
        ws.addCell(tz_o);
        ws.addCell(rsza_o);
        ws.addCell(rybh_o);
        ws.addCell(zz_o);
        ws.addCell(smza_o);
        ws.addCell(jwg_o);
        ws.addCell(qszz_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForHAMD(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label jl_o_i = getData(++index, reports, i, "jl_o");
        Label tz_o_i = getData(++index, reports, i, "tz_o");
        Label rsza_o_i = getData(++index, reports, i, "rsza_o");
        Label rybh_o_i = getData(++index, reports, i, "rybh_o");
        Label zz_o_i = getData(++index, reports, i, "zz_o");
        Label smza_o_i = getData(++index, reports, i, "smza_o");
        Label jwg_o_i = getData(++index, reports, i, "jwg_o");
        Label qszz_o_i = getData(++index, reports, i, "qszz_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(total_o_i);
        ws.addCell(jl_o_i);
        ws.addCell(tz_o_i);
        ws.addCell(rsza_o_i);
        ws.addCell(rybh_o_i);
        ws.addCell(zz_o_i);
        ws.addCell(smza_o_i);
        ws.addCell(jwg_o_i);
        ws.addCell(qszz_o_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForSCL90(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label total_o = new Label(++index, 0, "总分");
        Label total_ave = new Label(++index, 0, "总均分");
        Label nst_o = new Label(++index, 0, "阴性项目数原始分");
        Label pst_o = new Label(++index, 0, "阳性项目数原始分");
        Label pst_ave = new Label(++index, 0, "阳性项目平均分");
        Label som_o = new Label(++index, 0, "躯体化原始分");
        Label som_ave = new Label(++index, 0, "躯体化平均分");
        Label som_a = new Label(++index, 0, "躯体化参考诊断");
        Label obs_o = new Label(++index, 0, "强迫症状原始分");
        Label obs_ave = new Label(++index, 0, "强迫症状平均分");
        Label obs_a = new Label(++index, 0, "强迫症状参考诊断");
        Label int_o = new Label(++index, 0, "人际关系原始分");
        Label int_ave = new Label(++index, 0, "人际关系平均分");
        Label int_a = new Label(++index, 0, "人际关系参考诊断");
        Label dep_o = new Label(++index, 0, "抑郁原始分");
        Label dep_ave = new Label(++index, 0, "抑郁平均分");
        Label dep_a = new Label(++index, 0, "抑郁参考诊断");
        Label anx_o = new Label(++index, 0, "焦虑原始分");
        Label anx_ave = new Label(++index, 0, "焦虑平均分");
        Label anx_a = new Label(++index, 0, "焦虑参考诊断");
        Label hos_o = new Label(++index, 0, "敌对原始分");
        Label hos_ave = new Label(++index, 0, "敌对平均分");
        Label hos_a = new Label(++index, 0, "敌对参考诊断");
        Label pno_o = new Label(++index, 0, "恐怖原始分");
        Label pno_ave = new Label(++index, 0, "恐怖平均分");
        Label pno_a = new Label(++index, 0, "恐怖参考诊断");
        Label par_o = new Label(++index, 0, "偏执原始分");
        Label par_ave = new Label(++index, 0, "偏执平均分");
        Label par_a = new Label(++index, 0, "偏执参考诊断");
        Label psy_o = new Label(++index, 0, "精神病性原始分");
        Label psy_ave = new Label(++index, 0, "精神病性平均分");
        Label psy_a = new Label(++index, 0, "精神病性参考诊断");
        Label other_o = new Label(++index, 0, "其他项目原始分");
        Label other_ave = new Label(++index, 0, "其他项目平均分");
        Label other_a = new Label(++index, 0, "其他项目参考诊断");
        Label fifteenth = new Label(++index, 0, "第十五题选项");
//        Label reliability = new Label(46, 0, "可信度");

        ws.addCell(total_o);
        ws.addCell(total_ave);
        ws.addCell(nst_o);
        ws.addCell(pst_o);
        ws.addCell(pst_ave);
        ws.addCell(som_o);
        ws.addCell(som_ave);
        ws.addCell(som_a);
        ws.addCell(obs_o);
        ws.addCell(obs_ave);
        ws.addCell(obs_a);
        ws.addCell(int_o);
        ws.addCell(int_ave);
        ws.addCell(int_a);
        ws.addCell(dep_o);
        ws.addCell(dep_ave);
        ws.addCell(dep_a);
        ws.addCell(anx_o);
        ws.addCell(anx_ave);
        ws.addCell(anx_a);
        ws.addCell(hos_o);
        ws.addCell(hos_ave);
        ws.addCell(hos_a);
        ws.addCell(pno_o);
        ws.addCell(pno_ave);
        ws.addCell(pno_a);
        ws.addCell(par_o);
        ws.addCell(par_ave);
        ws.addCell(par_a);
        ws.addCell(psy_o);
        ws.addCell(psy_ave);
        ws.addCell(psy_a);
        ws.addCell(other_o);
        ws.addCell(other_ave);
        ws.addCell(other_a);
        ws.addCell(fifteenth);
//        ws.addCell(reliability);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForSCL90(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        ClsHKEffective mClsAiEffective = new ClsHKEffective();
        String answer_i = !reports.get(i).get("answer").toString().isEmpty() ? reports.get(i).get("answer").toString()
                : "暂无";

        String answer_secondsr_i = "";
        if (reports.get(i).get("answer_seconds") == null || "".equals(reports.get(i).get("answer_seconds").toString())) {
            answer_secondsr_i = "暂无";
        } else {
            answer_secondsr_i = reports.get(i).get("answer_seconds").toString();
        }

        Map<String, Object> mapTemp = mClsAiEffective.GetHKScl90Effective(answer_i, answer_secondsr_i);

        Label total_0_i = getData(++index, reports, i, "total_o");
        Label total_ave_i = getData(++index, reports, i, "total_ave");
        Label nst_o_i = getData(++index, reports, i, "nst_o");
        Label pst_o_i = getData(++index, reports, i, "pst_o");
        Label pst_ave_i = getData(++index, reports, i, "pst_ave");
        Label som_o_i = getData(++index, reports, i, "som_o");
        Label som_ave_i = getData(++index, reports, i, "som_ave");
        Label som_a_i = getData(++index, reports, i, "som_a");
        Label obs_o_i = getData(++index, reports, i, "obs_o");
        Label obs_ave_i = getData(++index, reports, i, "obs_ave");
        Label obs_a_i = getData(++index, reports, i, "obs_a");
        Label int_o_i = getData(++index, reports, i, "int_o");
        Label int_ave_i = getData(++index, reports, i, "int_ave");
        Label int_a_i = getData(++index, reports, i, "int_a");
        Label dep_o_i = getData(++index, reports, i, "dep_o");
        Label dep_ave_i = getData(++index, reports, i, "dep_ave");
        Label dep_a_i = getData(++index, reports, i, "dep_a");
        Label anx_o_i = getData(++index, reports, i, "anx_o");
        Label anx_ave_i = getData(++index, reports, i, "anx_ave");
        Label anx_a_i = getData(++index, reports, i, "anx_a");
        Label hos_o_i = getData(++index, reports, i, "hos_o");
        Label hos_ave_i = getData(++index, reports, i, "hos_ave");
        Label hos_a_i = getData(++index, reports, i, "hos_a");
        Label pno_o_i = getData(++index, reports, i, "pno_o");
        Label pno_ave_i = getData(++index, reports, i, "pno_ave");
        Label pno_a_i = getData(++index, reports, i, "pno_a");
        Label par_o_i = getData(++index, reports, i, "par_o");
        Label par_ave_i = getData(++index, reports, i, "par_ave");
        Label par_a_i = getData(++index, reports, i, "par_a");
        Label psy_o_i = getData(++index, reports, i, "psy_o");
        Label psy_ave_i = getData(++index, reports, i, "psy_ave");
        Label psy_a_i = getData(++index, reports, i, "psy_a");
        Label other_o_i = getData(++index, reports, i, "other_o");
        Label other_ave_i = getData(++index, reports, i, "other_ave");
        Label other_a_i = getData(++index, reports, i, "other_a");
        Label fifteenth_i = new Label(++index, i + 1, (String) mapTemp.get("fifteenth"));
//        Label reliability_i = new Label(++index, i + 1, (String) mapTemp.get("reliability"));


        ws.addCell(total_0_i);
        ws.addCell(total_ave_i);
        ws.addCell(nst_o_i);
        ws.addCell(pst_o_i);
        ws.addCell(pst_ave_i);
        ws.addCell(som_o_i);
        ws.addCell(som_ave_i);
        ws.addCell(som_a_i);
        ws.addCell(obs_o_i);
        ws.addCell(obs_ave_i);
        ws.addCell(obs_a_i);
        ws.addCell(int_o_i);
        ws.addCell(int_ave_i);
        ws.addCell(int_a_i);
        ws.addCell(dep_o_i);
        ws.addCell(dep_ave_i);
        ws.addCell(dep_a_i);
        ws.addCell(anx_o_i);
        ws.addCell(anx_ave_i);
        ws.addCell(anx_a_i);
        ws.addCell(hos_o_i);
        ws.addCell(hos_ave_i);
        ws.addCell(hos_a_i);
        ws.addCell(pno_o_i);
        ws.addCell(pno_ave_i);
        ws.addCell(pno_a_i);
        ws.addCell(par_o_i);
        ws.addCell(par_ave_i);
        ws.addCell(par_a_i);
        ws.addCell(psy_o_i);
        ws.addCell(psy_ave_i);
        ws.addCell(psy_a_i);
        ws.addCell(other_o_i);
        ws.addCell(other_ave_i);
        ws.addCell(other_a_i);
        ws.addCell(fifteenth_i);
//        ws.addCell(reliability_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForShirritant(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label total_o = new Label(++index, 0, "总分");

        ws.addCell(total_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForShirritant(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label total_0_i = getData(++index, reports, i, "total_o");
        ws.addCell(total_0_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);

    }

    private static void paintingForLES(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label fxsj_f = new Label(++index, 0, "负性事件频率");
        Label fxsj_i = new Label(++index, 0, "负性事件强度");
        Label zxsj_f = new Label(++index, 0, "中性事件频率");
        Label zxsj_i = new Label(++index, 0, "中性事件强度");
        Label exsj_f = new Label(++index, 0, "恶性事件频率");
        Label exsj_i = new Label(++index, 0, "恶性事件强度");
        Label total_f = new Label(++index, 0, "总分频率");
        Label total_i = new Label(++index, 0, "总分强度");
        Label xx_f = new Label(++index, 0, "学习频率");
        Label xx_i = new Label(++index, 0, "学习强度");
        Label hy_f = new Label(++index, 0, "婚姻频率");
        Label hy_i = new Label(++index, 0, "婚姻强度");
        Label jk_f = new Label(++index, 0, "健康频率");
        Label jk_i = new Label(++index, 0, "健康强度");
        Label jt_f = new Label(++index, 0, "家庭频率");
        Label jt_i = new Label(++index, 0, "家庭强度");
        Label gzyjj_f = new Label(++index, 0, "工作与经济频率");
        Label gzyjj_i = new Label(++index, 0, "工作与经济强度");
        Label rjgx_f = new Label(++index, 0, "人际关系频率");
        Label rjgx_i = new Label(++index, 0, "人际关系强度");
        Label hjwt_f = new Label(++index, 0, "环境问题频率");
        Label hjwt_i = new Label(++index, 0, "环境问题强度");
        Label flyzz_f = new Label(++index, 0, "法律与政治频率");
        Label flyzz_i = new Label(++index, 0, "法律与政治强度");

        ws.addCell(fxsj_f);
        ws.addCell(fxsj_i);
        ws.addCell(zxsj_f);
        ws.addCell(zxsj_i);
        ws.addCell(exsj_f);
        ws.addCell(exsj_i);
        ws.addCell(total_f);
        ws.addCell(total_i);
        ws.addCell(xx_f);
        ws.addCell(xx_i);
        ws.addCell(hy_f);
        ws.addCell(hy_i);
        ws.addCell(jk_f);
        ws.addCell(jk_i);
        ws.addCell(jt_f);
        ws.addCell(jt_i);
        ws.addCell(gzyjj_f);
        ws.addCell(gzyjj_i);
        ws.addCell(rjgx_f);
        ws.addCell(rjgx_i);
        ws.addCell(hjwt_f);
        ws.addCell(hjwt_i);
        ws.addCell(flyzz_f);
        ws.addCell(flyzz_i);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForLES(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label fxsj_f_i = getData(++index, reports, i, "fxsj_f");
        Label fxsj_i_i = getData(++index, reports, i, "fxsj_i");
        Label zxsj_f_i = getData(++index, reports, i, "zxsj_f");
        Label zxsj_i_i = getData(++index, reports, i, "zxsj_i");
        Label exsj_f_i = getData(++index, reports, i, "exsj_f");
        Label exsj_i_i = getData(++index, reports, i, "exsj_i");
        Label total_f_i = getData(++index, reports, i, "total_f");
        Label total_i_i = getData(++index, reports, i, "total_i");
        Label xx_f_i = getData(++index, reports, i, "xx_f");
        Label xx_i_i = getData(++index, reports, i, "xx_i");
        Label hy_f_i = getData(++index, reports, i, "hy_f");
        Label hy_i_i = getData(++index, reports, i, "hy_i");
        Label jk_f_i = getData(++index, reports, i, "jk_f");
        Label jk_i_i = getData(++index, reports, i, "jk_i");
        Label jt_f_i = getData(++index, reports, i, "jt_f");
        Label jt_i_i = getData(++index, reports, i, "jt_i");
        Label gzyjj_f_i = getData(++index, reports, i, "gzyjj_f");
        Label gzyjj_i_i = getData(++index, reports, i, "gzyjj_i");
        Label rjgx_f_i = getData(++index, reports, i, "rjgx_f");
        Label rjgx_i_i = getData(++index, reports, i, "rjgx_i");
        Label hjwt_f_i = getData(++index, reports, i, "hjwt_f");
        Label hjwt_i_i = getData(++index, reports, i, "hjwt_i");
        Label flyzz_f_i = getData(++index, reports, i, "flyzz_f");
        Label flyzz_i_i = getData(++index, reports, i, "flyzz_i");

        ws.addCell(fxsj_f_i);
        ws.addCell(fxsj_i_i);
        ws.addCell(zxsj_f_i);
        ws.addCell(zxsj_i_i);
        ws.addCell(exsj_f_i);
        ws.addCell(exsj_i_i);
        ws.addCell(total_f_i);
        ws.addCell(total_i_i);
        ws.addCell(xx_f_i);
        ws.addCell(xx_i_i);
        ws.addCell(hy_f_i);
        ws.addCell(hy_i_i);
        ws.addCell(jk_f_i);
        ws.addCell(jk_i_i);
        ws.addCell(jt_f_i);
        ws.addCell(jt_i_i);
        ws.addCell(gzyjj_f_i);
        ws.addCell(gzyjj_i_i);
        ws.addCell(rjgx_f_i);
        ws.addCell(rjgx_i_i);
        ws.addCell(hjwt_f_i);
        ws.addCell(hjwt_i_i);
        ws.addCell(flyzz_f_i);
        ws.addCell(flyzz_i_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForAslec(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label rjgx_o = new Label(++index, 0, "人际关系因子");
        Label xxyl_o = new Label(++index, 0, "学习压力因子");
        Label scf_o = new Label(++index, 0, "受惩罚因子");
        Label ss_o = new Label(++index, 0, "丧失因子");
        Label jksy_o = new Label(++index, 0, "健康适应因子");
        Label other_o = new Label(++index, 0, "其他");

        ws.addCell(rjgx_o);
        ws.addCell(xxyl_o);
        ws.addCell(scf_o);
        ws.addCell(ss_o);
        ws.addCell(jksy_o);
        ws.addCell(other_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForAslec(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label rjgx_o_i = getData(++index, reports, i, "rjgx_o");
        Label xxyl_o_i = getData(++index, reports, i, "xxyl_o");
        Label scf_o_i = getData(++index, reports, i, "scf_o");
        Label ss_o_i = getData(++index, reports, i, "ss_o");
        Label jksy_o_i = getData(++index, reports, i, "jksy_o");
        Label other_o_i = getData(++index, reports, i, "other_o");

        ws.addCell(rjgx_o_i);
        ws.addCell(xxyl_o_i);
        ws.addCell(scf_o_i);
        ws.addCell(ss_o_i);
        ws.addCell(jksy_o_i);
        ws.addCell(other_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForAdhd(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label zyl_o = new Label(++index, 0, "注意力分散");
        Label dd_o = new Label(++index, 0, "多动或冲动");
        Label total_a = new Label(++index, 0, "诊断结果");

        ws.addCell(zyl_o);
        ws.addCell(dd_o);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForAdhd(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label zyl_o_i = getData(++index, reports, i, "zyl_o");
        Label dd_o_i = getData(++index, reports, i, "dd_o");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(zyl_o_i);
        ws.addCell(dd_o_i);
        ws.addCell(total_a_i);

        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForXljk(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label qbzz_o = new Label(++index, 0, "强迫症状得分");
        Label qbzz_ave = new Label(++index, 0, "强迫症状平均分");
        Label qbzz_a = new Label(++index, 0, "强迫症状参考诊断");

        Label pz_o = new Label(++index, 0, "偏执得分");
        Label pz_ave = new Label(++index, 0, "偏执平均分");
        Label pz_a = new Label(++index, 0, "偏执参考诊断");

        Label dd_o = new Label(++index, 0, "敌对得分");
        Label dd_ave = new Label(++index, 0, "敌对平均分");
        Label dd_a = new Label(++index, 0, "敌对参考诊断");

        Label rjgx_o = new Label(++index, 0, "人际关系紧张与敏感得分");
        Label rjgx_ave = new Label(++index, 0, "人际关系紧张与敏感平均分");
        Label rjgx_a = new Label(++index, 0, "人际关系紧张与敏感参考诊断");

        Label yy_o = new Label(++index, 0, "抑郁得分");
        Label yy_ave = new Label(++index, 0, "抑郁平均分");
        Label yy_a = new Label(++index, 0, "抑郁参考诊断");

        Label jl_o = new Label(++index, 0, "焦虑得分");
        Label jl_ave = new Label(++index, 0, "焦虑平均分");
        Label jl_a = new Label(++index, 0, "焦虑参考诊断");

        Label xxyl_o = new Label(++index, 0, "学习压力得分");
        Label xxyl_ave = new Label(++index, 0, "学习压力平均分");
        Label xxyl_a = new Label(++index, 0, "学习压力参考诊断");

        Label sybl_o = new Label(++index, 0, "适应不良得分");
        Label sybl_ave = new Label(++index, 0, "适应不良平均分");
        Label sybl_a = new Label(++index, 0, "适应不良参考诊断");

        Label qx_o = new Label(++index, 0, "情绪不平衡得分");
        Label qx_ave = new Label(++index, 0, "情绪不平衡平均分");
        Label qx_a = new Label(++index, 0, "情绪不平衡参考诊断");

        Label xl_o = new Label(++index, 0, "心理不平衡得分");
        Label xl_ave = new Label(++index, 0, "心理不平衡平均分");
        Label xl_a = new Label(++index, 0, "心理不平衡参考诊断");

        Label total_o = new Label(++index, 0, "总分得分");
        Label total_ave = new Label(++index, 0, "总分平均分");
        Label total_a = new Label(++index, 0, "总分参考诊断");

        ws.addCell(qbzz_o);
        ws.addCell(qbzz_ave);
        ws.addCell(qbzz_a);

        ws.addCell(pz_o);
        ws.addCell(pz_ave);
        ws.addCell(pz_a);

        ws.addCell(dd_o);
        ws.addCell(dd_ave);
        ws.addCell(dd_a);

        ws.addCell(rjgx_o);
        ws.addCell(rjgx_ave);
        ws.addCell(rjgx_a);

        ws.addCell(yy_o);
        ws.addCell(yy_ave);
        ws.addCell(yy_a);

        ws.addCell(jl_o);
        ws.addCell(jl_ave);
        ws.addCell(jl_a);

        ws.addCell(xxyl_o);
        ws.addCell(xxyl_ave);
        ws.addCell(xxyl_a);

        ws.addCell(sybl_o);
        ws.addCell(sybl_ave);
        ws.addCell(sybl_a);

        ws.addCell(qx_o);
        ws.addCell(qx_ave);
        ws.addCell(qx_a);

        ws.addCell(xl_o);
        ws.addCell(xl_ave);
        ws.addCell(xl_a);

        ws.addCell(total_o);
        ws.addCell(total_ave);
        ws.addCell(total_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForXljk(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label qbzz_o_i = getData(++index, reports, i, "qbzz_o");
        Label qbzz_ave_i = getData(++index, reports, i, "qbzz_ave");
        Label qbzz_a_i = getData(++index, reports, i, "qbzz_a");

        Label pz_o_i = getData(++index, reports, i, "pz_o");
        Label pz_ave_i = getData(++index, reports, i, "pz_ave");
        Label pz_a_i = getData(++index, reports, i, "pz_a");

        Label dd_o_i = getData(++index, reports, i, "dd_o");
        Label dd_ave_i = getData(++index, reports, i, "dd_ave");
        Label dd_a_i = getData(++index, reports, i, "dd_a");

        Label rjgx_o_i = getData(++index, reports, i, "rjgx_o");
        Label rjgx_ave_i = getData(++index, reports, i, "rjgx_ave");
        Label rjgx_a_i = getData(++index, reports, i, "rjgx_a");

        Label yy_o_i = getData(++index, reports, i, "yy_o");
        Label yy_ave_i = getData(++index, reports, i, "yy_ave");
        Label yy_a_i = getData(++index, reports, i, "yy_a");

        Label jl_o_i = getData(++index, reports, i, "jl_o");
        Label jl_ave_i = getData(++index, reports, i, "jl_ave");
        Label jl_a_i = getData(++index, reports, i, "jl_a");

        Label xxyl_o_i = getData(++index, reports, i, "xxyl_o");
        Label xxyl_ave_i = getData(++index, reports, i, "xxyl_ave");
        Label xxyl_a_i = getData(++index, reports, i, "xxyl_a");

        Label sybl_o_i = getData(++index, reports, i, "sybl_o");
        Label sybl_ave_i = getData(++index, reports, i, "sybl_ave");
        Label sybl_a_i = getData(++index, reports, i, "sybl_a");

        Label qx_o_i = getData(++index, reports, i, "qx_o");
        Label qx_ave_i = getData(++index, reports, i, "qx_ave");
        Label qx_a_i = getData(++index, reports, i, "qx_a");

        Label xl_o_i = getData(++index, reports, i, "xl_o");
        Label xl_ave_i = getData(++index, reports, i, "xl_ave");
        Label xl_a_i = getData(++index, reports, i, "xl_a");

        Label total_o_i = getData(++index, reports, i, "total_o");
        Label total_ave_i = getData(++index, reports, i, "total_ave");
        Label total_a_i = getData(++index, reports, i, "total_a");

        ws.addCell(qbzz_o_i);
        ws.addCell(qbzz_ave_i);
        ws.addCell(qbzz_a_i);

        ws.addCell(pz_o_i);
        ws.addCell(pz_ave_i);
        ws.addCell(pz_a_i);

        ws.addCell(dd_o_i);
        ws.addCell(dd_ave_i);
        ws.addCell(dd_a_i);

        ws.addCell(rjgx_o_i);
        ws.addCell(rjgx_ave_i);
        ws.addCell(rjgx_a_i);

        ws.addCell(yy_o_i);
        ws.addCell(yy_ave_i);
        ws.addCell(yy_a_i);

        ws.addCell(jl_o_i);
        ws.addCell(jl_ave_i);
        ws.addCell(jl_a_i);

        ws.addCell(xxyl_o_i);
        ws.addCell(xxyl_ave_i);
        ws.addCell(xxyl_a_i);

        ws.addCell(sybl_o_i);
        ws.addCell(sybl_ave_i);
        ws.addCell(sybl_a_i);

        ws.addCell(qx_o_i);
        ws.addCell(qx_ave_i);
        ws.addCell(qx_a_i);

        ws.addCell(xl_o_i);
        ws.addCell(xl_ave_i);
        ws.addCell(xl_a_i);

        ws.addCell(total_o_i);
        ws.addCell(total_ave_i);
        ws.addCell(total_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForXxdj(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label dj_o = new Label(++index, 0, "学习动机得分");
        Label dj_a = new Label(++index, 0, "学习动机参考诊断");
        Label yl_o = new Label(++index, 0, "学习压力得分");
        Label yl_a = new Label(++index, 0, "学习压力参考诊断");
        Label xq_o = new Label(++index, 0, "学习兴趣得分");
        Label xq_a = new Label(++index, 0, "学习兴趣参考诊断");
        Label mb_o = new Label(++index, 0, "学习目标得分");
        Label mb_a = new Label(++index, 0, "学习目标参考诊断");

        ws.addCell(dj_o);
        ws.addCell(dj_a);
        ws.addCell(yl_o);
        ws.addCell(yl_a);
        ws.addCell(xq_o);
        ws.addCell(xq_a);
        ws.addCell(mb_o);
        ws.addCell(mb_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForXxdj(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label dj_o_i = getData(++index, reports, i, "dj_o");
        Label dj_a_i = getData(++index, reports, i, "dj_a");
        Label yl_o_i = getData(++index, reports, i, "yl_o");
        Label yl_a_i = getData(++index, reports, i, "yl_a");
        Label xq_o_i = getData(++index, reports, i, "xq_o");
        Label xq_a_i = getData(++index, reports, i, "xq_a");
        Label mb_o_i = getData(++index, reports, i, "mb_o");
        Label mb_a_i = getData(++index, reports, i, "mb_a");

        ws.addCell(dj_o_i);
        ws.addCell(dj_a_i);
        ws.addCell(yl_o_i);
        ws.addCell(yl_a_i);
        ws.addCell(xq_o_i);
        ws.addCell(xq_a_i);
        ws.addCell(mb_o_i);
        ws.addCell(mb_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForKsxwkl(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label dj_o = new Label(++index, 0, "动机与效果");
        Label ss_o = new Label(++index, 0, "应试技巧");
        Label kq_o = new Label(++index, 0, "考前身心健康");
        Label xl_o = new Label(++index, 0, "心理控制能力");

        ws.addCell(dj_o);
        ws.addCell(ss_o);
        ws.addCell(kq_o);
        ws.addCell(xl_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForKsxwkl(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label dj_o_i = getData(++index, reports, i, "dj_o");
        Label ss_o_i = getData(++index, reports, i, "ss_o");
        Label kq_o_i = getData(++index, reports, i, "kq_o");
        Label xl_o_i = getData(++index, reports, i, "xl_o");

        ws.addCell(dj_o_i);
        ws.addCell(ss_o_i);
        ws.addCell(kq_o_i);
        ws.addCell(xl_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForTotal(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {
        Label total_o = new Label(++index, 0, "总分");

        ws.addCell(total_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForTotal(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label total_o_i = getData(++index, reports, i, "total_o");

        ws.addCell(total_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForXxxljkzh(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label xx_o = new Label(++index, 0, "学习障碍得分");
        Label xx_a = new Label(++index, 0, "学习障碍参考诊断");
        Label qx_o = new Label(++index, 0, "情绪障碍得分");
        Label qx_a = new Label(++index, 0, "情绪障碍参考诊断");
        Label xg_o = new Label(++index, 0, "性格缺陷得分");
        Label xg_a = new Label(++index, 0, "性格缺陷参考诊断");
        Label sh_o = new Label(++index, 0, "社会适应障碍得分");
        Label sh_a = new Label(++index, 0, "社会适应障碍参考诊断");

        Label pd_o = new Label(++index, 0, "品德缺陷得分");
        Label pd_a = new Label(++index, 0, "品德缺陷参考诊断");
        Label bl_o = new Label(++index, 0, "不良习惯得分");
        Label bl_a = new Label(++index, 0, "不良习惯参考诊断");
        Label xw_o = new Label(++index, 0, "行为障碍得分");
        Label xw_a = new Label(++index, 0, "行为障碍");
        Label tz_o = new Label(++index, 0, "特种障碍");
        Label tz_a = new Label(++index, 0, "特种障碍参考诊断");

        ws.addCell(xx_o);
        ws.addCell(xx_a);
        ws.addCell(qx_o);
        ws.addCell(qx_a);
        ws.addCell(xg_o);
        ws.addCell(xg_a);
        ws.addCell(sh_o);
        ws.addCell(sh_a);

        ws.addCell(pd_o);
        ws.addCell(pd_a);
        ws.addCell(bl_o);
        ws.addCell(bl_a);
        ws.addCell(xw_o);
        ws.addCell(xw_a);
        ws.addCell(tz_o);
        ws.addCell(tz_a);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForXxxljkzh(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label xx_o_i = getData(++index, reports, i, "xx_o");
        Label xx_a_i = getData(++index, reports, i, "xx_a");
        Label qx_o_i = getData(++index, reports, i, "qx_o");
        Label qx_a_i = getData(++index, reports, i, "qx_a");
        Label xg_o_i = getData(++index, reports, i, "xg_o");
        Label xg_a_i = getData(++index, reports, i, "xg_a");
        Label sh_o_i = getData(++index, reports, i, "sh_o");
        Label sh_a_i = getData(++index, reports, i, "sh_a");

        Label pd_o_i = getData(++index, reports, i, "pd_o");
        Label pd_a_i = getData(++index, reports, i, "pd_a");
        Label bl_o_i = getData(++index, reports, i, "bl_o");
        Label bl_a_i = getData(++index, reports, i, "bl_a");
        Label xw_o_i = getData(++index, reports, i, "xw_o");
        Label xw_a_i = getData(++index, reports, i, "xw_a");
        Label tz_o_i = getData(++index, reports, i, "tz_o");
        Label tz_a_i = getData(++index, reports, i, "tz_a");

        ws.addCell(xx_o_i);
        ws.addCell(xx_a_i);
        ws.addCell(qx_o_i);
        ws.addCell(qx_a_i);
        ws.addCell(xg_o_i);
        ws.addCell(xg_a_i);
        ws.addCell(sh_o_i);
        ws.addCell(sh_a_i);

        ws.addCell(pd_o_i);
        ws.addCell(pd_a_i);
        ws.addCell(bl_o_i);
        ws.addCell(bl_a_i);
        ws.addCell(xw_o_i);
        ws.addCell(xw_a_i);
        ws.addCell(tz_o_i);
        ws.addCell(tz_a_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

    private static void paintingForZxxljkzh(Integer index,WritableSheet ws, List<ExtFieldRecord> channelExtFieldRecord) throws WriteException, RowsExceededException {

        Label total_o = new Label(++index, 0, "总分");
        Label xx_o = new Label(++index, 0, "学习焦虑");
        Label dr_o = new Label(++index, 0, "对人焦虑");
        Label gd_o = new Label(++index, 0, "孤独倾向");
        Label zz_o = new Label(++index, 0, "自责倾向");
        Label gm_o = new Label(++index, 0, "过敏倾向");
        Label st_o = new Label(++index, 0, "身体症状");
        Label kb_o = new Label(++index, 0, "恐怖倾向");
        Label cd_o = new Label(++index, 0, "冲动倾向");
        Label ys_o = new Label(++index, 0, "掩饰分");

        ws.addCell(total_o);
        ws.addCell(xx_o);
        ws.addCell(dr_o);
        ws.addCell(gd_o);
        ws.addCell(zz_o);
        ws.addCell(gm_o);
        ws.addCell(st_o);
        ws.addCell(kb_o);
        ws.addCell(cd_o);
        ws.addCell(ys_o);
        basePaintingExtFieldRecord(channelExtFieldRecord, ws, index);
    }

    private static void fillDataForZxxljkzh(Integer index,WritableSheet ws, List<Map<String, Object>> reports, int i, List<ExtFieldRecord> channelExtFieldRecord)
            throws RowsExceededException, WriteException {
        Label total_o_i = getData(++index, reports, i, "total_o");
        Label xx_o_i = getData(++index, reports, i, "xx_o");
        Label dr_o_i = getData(++index, reports, i, "dr_o");
        Label gd_o_i = getData(++index, reports, i, "gd_o");
        Label zz_o_i = getData(++index, reports, i, "zz_o");
        Label gm_o_i = getData(++index, reports, i, "gm_o");
        Label st_o_i = getData(++index, reports, i, "st_o");
        Label kb_o_i = getData(++index, reports, i, "kb_o");
        Label cd_o_i = getData(++index, reports, i, "cd_o");
        Label ys_o_i = getData(++index, reports, i, "ys_o");

        ws.addCell(total_o_i);
        ws.addCell(xx_o_i);
        ws.addCell(dr_o_i);
        ws.addCell(gd_o_i);
        ws.addCell(zz_o_i);
        ws.addCell(gm_o_i);
        ws.addCell(st_o_i);
        ws.addCell(kb_o_i);
        ws.addCell(cd_o_i);
        ws.addCell(ys_o_i);
        Object ext_json = reports.get(i).get("ext_json");
        baseFillExtFieldRecord(channelExtFieldRecord, ws, index, i, ext_json);
    }

}